storagenode

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBallastSize               = "0B"
	DefaultMaxLogStreamReplicasCount = -1

	DefaultAppendPipelineSize = 8
	MinAppendPipelineSize     = 1
	MaxAppendPipelineSize     = 16
)

Variables

This section is empty.

Functions

func TestAddLogStreamReplica

func TestAddLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID, path, addr string)

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 TestNewLogIOClient(t *testing.T, snid types.StorageNodeID, addr string) (*client.LogClient, func())

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 TestSealLogStreamReplica

func TestSealLogStreamReplica(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, tpid types.TopicID, lsid types.LogStreamID, lastCommittedGLSN types.GLSN, addr string) (varlogpb.LogStreamStatus, types.GLSN)

func TestSubscribe

func TestSubscribe(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, begin, end types.GLSN, snid types.StorageNodeID, addr string) []varlogpb.LogEntry

func TestSubscribeTo

func TestSubscribeTo(t *testing.T, tpid types.TopicID, lsid types.LogStreamID, begin, end types.LLSN, snid types.StorageNodeID, addr string) []varlogpb.LogEntry

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 TestTrim

func TestTrim(t *testing.T, cid types.ClusterID, snid types.StorageNodeID, tpid types.TopicID, glsn types.GLSN, addr string) map[types.LogStreamID]error

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 WithAdvertiseAddress(advertise string) Option

func WithAppendPipelineSize added in v0.14.0

func WithAppendPipelineSize(appendPipelineSize int32) Option

func WithBallastSize

func WithBallastSize(ballastSize int64) Option

func WithClusterID

func WithClusterID(cid types.ClusterID) Option

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 WithDefaultStorageOptions

func WithDefaultStorageOptions(defaultStorageOpts ...storage.Option) Option

func WithListenAddress

func WithListenAddress(listen string) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithMaxLogStreamReplicasCount added in v0.10.0

func WithMaxLogStreamReplicasCount(maxLogStreamReplicasCount int32) Option

func WithPProfOptions

func WithPProfOptions(pprofOpts ...pprof.Option) Option

func WithStorageNodeID

func WithStorageNodeID(snid types.StorageNodeID) Option

func WithVolumes

func WithVolumes(volumes ...string) Option

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

Directories

Path Synopsis
Package client is a generated GoMock package.
Package client is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL