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 WithAppendPipelineSize(appendPipelineSize int32) Option
- func WithBallastSize(ballastSize int64) Option
- func WithClusterID(cid types.ClusterID) Option
- func WithDefaultGRPCDialOptions(grpcDialOptions ...grpc.DialOption) Option
- func WithDefaultGRPCServerOptions(grpcServerOptions ...grpc.ServerOption) Option
- func WithDefaultLogStreamExecutorOptions(defaultLSEOptions ...logstream.ExecutorOption) Option
- func WithDefaultStorageOptions(defaultStorageOpts ...storage.Option) Option
- func WithListenAddress(listen string) Option
- func WithLogger(logger *zap.Logger) Option
- func WithMaxLogStreamReplicasCount(maxLogStreamReplicasCount int32) Option
- func WithPProfOptions(pprofOpts ...pprof.Option) Option
- func WithStorageNodeID(snid types.StorageNodeID) Option
- func WithVolumes(volumes ...string) Option
- type StorageNode
Constants ¶
View Source
const ( DefaultBallastSize = "0B" DefaultMaxLogStreamReplicasCount = -1 DefaultAppendPipelineSize = 8 MinAppendPipelineSize = 1 MaxAppendPipelineSize = 16 )
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 WithAppendPipelineSize ¶ added in v0.14.0
func WithBallastSize ¶
func WithClusterID ¶
func WithDefaultGRPCDialOptions ¶ added in v0.21.0
func WithDefaultGRPCDialOptions(grpcDialOptions ...grpc.DialOption) Option
func WithDefaultGRPCServerOptions ¶ added in v0.21.0
func WithDefaultGRPCServerOptions(grpcServerOptions ...grpc.ServerOption) Option
func WithDefaultLogStreamExecutorOptions ¶
func WithDefaultLogStreamExecutorOptions(defaultLSEOptions ...logstream.ExecutorOption) Option
func WithListenAddress ¶
func WithLogger ¶
func WithMaxLogStreamReplicasCount ¶ added in v0.10.0
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.