Documentation ¶
Index ¶
- Constants
- func TestAddLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, ...)
- func TestAppend(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, dataBatch [][]byte, ...) []snpb.AppendResult
- func TestGetAdvertiseAddress(t *testing.T, sn *StorageNode) string
- func TestGetStorageNodeID(t *testing.T, sn *StorageNode) types.StorageNodeID
- func TestGetStorageNodeMetadataDescriptor(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, addr string) *snpb.StorageNodeMetadataDescriptor
- func TestGetStorageNodeMetadataDescriptorWithoutAddr(t *testing.T, sn *StorageNode) *snpb.StorageNodeMetadataDescriptor
- func TestNewLogIOClient(t *testing.T, snid types.StorageNodeID, addr string) (*client.LogClient, func())
- func TestNewManagementClient(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, addr string) (*client.ManagementClient, func())
- func TestNewRPCServer(t *testing.T, ctrl *gomock.Controller, snid types.StorageNodeID, ...) *testRPCServer
- func TestSealLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, ...) (varlogpb.LogStreamStatus, types.GLSN)
- func TestSubscribe(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, ...) []varlogpb.LogEntry
- func TestSubscribeTo(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, ...) []varlogpb.LogEntry
- func TestSync(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, ...) *snpb.SyncStatus
- func TestTrim(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, ...) map[types.LogStreamID]error
- func TestUnsealLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, ...)
- func TestWaitForStartingOfServe(t *testing.T, sn *StorageNode, timeouts ...time.Duration)
- type Option
- func WithAdvertiseAddress(advertise string) Option
- func WithBallastSize(ballastSize int64) Option
- func WithClusterID(cid types.ClusterID) Option
- func WithDefaultLogStreamExecutorOptions(defaultLSEOptions ...logstream.ExecutorOption) Option
- func WithDefaultStorageOptions(defaultStorageOpts ...storage.Option) Option
- func WithGRPCServerMaxRecvMsgSize(grpcServerMaxRecvMsgSize int64) Option
- func WithGRPCServerReadBufferSize(grpcServerReadBufferSize int64) Option
- func WithGRPCServerWriteBufferSize(grpcServerWriteBufferSize int64) Option
- func WithListenAddress(listen string) Option
- func WithLogger(logger *zap.Logger) Option
- func WithPProfOptions(pprofOpts ...pprof.Option) Option
- func WithReplicateClientReadBufferSize(replicateClientReadBufferSize int64) Option
- func WithReplicateClientWriteBufferSize(replicateClientWriteBufferSize int64) Option
- func WithStorageNodeID(snid types.StorageNodeID) Option
- func WithVolumes(volumes ...string) Option
- type StorageNode
Constants ¶
View Source
const ( DefaultServerReadBufferSize = 32 << 10 DefaultServerWriteBufferSize = 32 << 10 DefaultServerMaxRecvSize = 4 << 20 DefaultReplicateClientReadBufferSize = 32 << 10 DefaultReplicateClientWriteBufferSize = 32 << 10 )
Variables ¶
This section is empty.
Functions ¶
func TestAddLogStreamReplica ¶
func TestAppend ¶
func TestAppend(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, dataBatch [][]byte, replicas []varlogpb.LogStreamReplica) []snpb.AppendResult
func TestGetAdvertiseAddress ¶
func TestGetAdvertiseAddress(t *testing.T, sn *StorageNode) string
func TestGetStorageNodeID ¶
func TestGetStorageNodeID(t *testing.T, sn *StorageNode) types.StorageNodeID
func TestGetStorageNodeMetadataDescriptor ¶
func TestGetStorageNodeMetadataDescriptor(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, addr string) *snpb.StorageNodeMetadataDescriptor
func TestGetStorageNodeMetadataDescriptorWithoutAddr ¶
func TestGetStorageNodeMetadataDescriptorWithoutAddr(t *testing.T, sn *StorageNode) *snpb.StorageNodeMetadataDescriptor
func TestNewLogIOClient ¶
func TestNewManagementClient ¶
func TestNewManagementClient(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, addr string) (*client.ManagementClient, func())
func TestNewRPCServer ¶
func TestNewRPCServer(t *testing.T, ctrl *gomock.Controller, snid types.StorageNodeID, address ...string) *testRPCServer
func TestSubscribe ¶
func TestSubscribeTo ¶
func TestSync ¶
func TestSync(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID, lastGLSN types.GLSN, addr string, dst varlogpb.StorageNode) *snpb.SyncStatus
func TestUnsealLogStreamReplica ¶
func TestUnsealLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID, replicas []varlogpb.LogStreamReplica, addr string)
func TestWaitForStartingOfServe ¶
func TestWaitForStartingOfServe(t *testing.T, sn *StorageNode, timeouts ...time.Duration)
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAdvertiseAddress ¶
func WithBallastSize ¶
func WithClusterID ¶
func WithDefaultLogStreamExecutorOptions ¶
func WithDefaultLogStreamExecutorOptions(defaultLSEOptions ...logstream.ExecutorOption) Option
func WithListenAddress ¶
func WithLogger ¶
func WithPProfOptions ¶
func WithStorageNodeID ¶
func WithStorageNodeID(snid types.StorageNodeID) Option
func WithVolumes ¶
type StorageNode ¶
type StorageNode struct {
// contains filtered or unexported fields
}
func NewStorageNode ¶
func NewStorageNode(opts ...Option) (*StorageNode, error)
func TestNewSimpleStorageNode ¶
func TestNewSimpleStorageNode(t *testing.T, opts ...Option) *StorageNode
func TestNewStorageNode ¶
func TestNewStorageNode(tb testing.TB, opts ...Option) *StorageNode
func (*StorageNode) Close ¶
func (sn *StorageNode) Close() (err error)
func (*StorageNode) Serve ¶
func (sn *StorageNode) Serve() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.