mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 23:15:28 +08:00
issue: #33285 - implement producing and consuming server of message - implement management operation for streaming node server --------- Signed-off-by: chyezh <chyezh@outlook.com>
30 lines
896 B
Go
30 lines
896 B
Go
package walmanager
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/milvus-io/milvus/internal/streamingnode/server/wal"
|
|
"github.com/milvus-io/milvus/pkg/streaming/util/types"
|
|
)
|
|
|
|
var _ Manager = (*managerImpl)(nil)
|
|
|
|
// Manager is the interface for managing the wal instances.
|
|
type Manager interface {
|
|
// Open opens a wal instance for the channel on this Manager.
|
|
Open(ctx context.Context, channel types.PChannelInfo) error
|
|
|
|
// GetAvailableWAL returns a available wal instance for the channel.
|
|
// Return nil if the wal instance is not found.
|
|
GetAvailableWAL(channel types.PChannelInfo) (wal.WAL, error)
|
|
|
|
// GetAllAvailableWALInfo returns all available channel info.
|
|
GetAllAvailableChannels() ([]types.PChannelInfo, error)
|
|
|
|
// Remove removes the wal instance for the channel.
|
|
Remove(ctx context.Context, channel types.PChannelInfo) error
|
|
|
|
// Close these manager and release all managed WAL.
|
|
Close()
|
|
}
|