conf

package
v0.0.0-...-4334ecd Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimpleNodeConfiguration

func SimpleNodeConfiguration(nodeHostDir string, walDir string, raftAddress string) iface.INodeConfiguration

func SimpleOnDiskClusterConfiguration

func SimpleOnDiskClusterConfiguration(clusterID uint64,
	clusterName string,
	initialMembers map[uint64]string,
	join bool) iface.IOnDiskClusterConfiguration

func SimpleRaftConfiguration

func SimpleRaftConfiguration(nodeID uint64) iface.IRaftConfiguration

func SimpleStoragedConfiguration

func SimpleStoragedConfiguration(path string, secretKey []byte) iface.IStoragedConfiguration

Types

type NodeConfiguration

type NodeConfiguration struct {
	NodeConfigurationInput NodeConfigurationInput
	// contains filtered or unexported fields
}

func (*NodeConfiguration) CAFile

func (n *NodeConfiguration) CAFile() string

func (*NodeConfiguration) CertFile

func (n *NodeConfiguration) CertFile() string

func (*NodeConfiguration) DeploymentID

func (n *NodeConfiguration) DeploymentID() uint64

func (*NodeConfiguration) EnableMetrics

func (n *NodeConfiguration) EnableMetrics() bool

func (*NodeConfiguration) KeyFile

func (n *NodeConfiguration) KeyFile() string

func (*NodeConfiguration) ListenAddress

func (n *NodeConfiguration) ListenAddress() string

func (*NodeConfiguration) LogDB

func (*NodeConfiguration) LogDBFactory

func (n *NodeConfiguration) LogDBFactory() config.LogDBFactoryFunc

func (*NodeConfiguration) MaxReceiveQueueSize

func (n *NodeConfiguration) MaxReceiveQueueSize() uint64

func (*NodeConfiguration) MaxSendQueueSize

func (n *NodeConfiguration) MaxSendQueueSize() uint64

func (*NodeConfiguration) MaxSnapshotRecvBytesPerSecond

func (n *NodeConfiguration) MaxSnapshotRecvBytesPerSecond() uint64

func (*NodeConfiguration) MaxSnapshotSendBytesPerSecond

func (n *NodeConfiguration) MaxSnapshotSendBytesPerSecond() uint64

func (*NodeConfiguration) MutualTLS

func (n *NodeConfiguration) MutualTLS() bool

func (*NodeConfiguration) NodeHostDir

func (n *NodeConfiguration) NodeHostDir() string

Dragonboat NodeHostConfig

func (*NodeConfiguration) NotifyCommit

func (n *NodeConfiguration) NotifyCommit() bool

func (*NodeConfiguration) RTTMillisecond

func (n *NodeConfiguration) RTTMillisecond() uint64

WALDir() string NodeHostDir() string

func (*NodeConfiguration) RaftAddress

func (n *NodeConfiguration) RaftAddress() string

func (*NodeConfiguration) RaftEventListener

func (n *NodeConfiguration) RaftEventListener() raftio.IRaftEventListener

func (*NodeConfiguration) RaftRPCFactory

func (n *NodeConfiguration) RaftRPCFactory() config.RaftRPCFactoryFunc

func (*NodeConfiguration) SystemEventListener

func (n *NodeConfiguration) SystemEventListener() raftio.ISystemEventListener

func (*NodeConfiguration) SystemTickerPrecision

func (n *NodeConfiguration) SystemTickerPrecision() time.Duration

func (*NodeConfiguration) WALDir

func (n *NodeConfiguration) WALDir() string

type NodeConfigurationInput

type NodeConfigurationInput struct {
	NodeHostDir    string `json:"nodeHostDir"`
	WALDir         string `json:"walDir"`
	DeploymentID   uint64 `json:"deploymentId"`
	RTTMillisecond uint64 `json:"rttMillisecond"`

	RaftAddress   string `json:"raftAddress"`
	ListenAddress string `json:"listenAddress"`

	MutualTLS bool   `json:"mutualTLS"`
	CAFile    string `json:"caFile"`
	CertFile  string `json:"certFile"`
	KeyFile   string `json:"keyFile"`

	MaxSendQueueSize    uint64 `json:"maxSendQueueSize"`
	MaxReceiveQueueSize uint64 `json:"maxReceiveQueueSize"`

	EnableMetrics                 bool   `json:"enableMetrics"`
	MaxSnapshotSendBytesPerSecond uint64 `json:"maxSnapshotSendBytesPerSecond"`
	MaxSnapshotRecvBytesPerSecond uint64 `json:"maxSnapshotRecvBytesPerSecond"`

	SystemTickerPrecision time.Duration `json:"systemTickerPrecision"`

	NotifyCommit bool `json:"notifyCommit"`

	LogDB               config.LogDBConfig          `json:"-"`
	LogDBFactory        config.LogDBFactoryFunc     `json:"-"`
	RaftRPCFactory      config.RaftRPCFactoryFunc   `json:"-"`
	RaftEventListener   raftio.IRaftEventListener   `json:"-"`
	SystemEventListener raftio.ISystemEventListener `json:"-"`
}

type OnDiskClusterConfiguration

type OnDiskClusterConfiguration struct {
	OnDiskClusterConfigurationInput OnDiskClusterConfigurationInput
	// contains filtered or unexported fields
}

func (*OnDiskClusterConfiguration) ClusterID

func (c *OnDiskClusterConfiguration) ClusterID() uint64

func (*OnDiskClusterConfiguration) ClusterName

func (c *OnDiskClusterConfiguration) ClusterName() string

func (*OnDiskClusterConfiguration) InitialMembers

func (c *OnDiskClusterConfiguration) InitialMembers() map[uint64]string

func (*OnDiskClusterConfiguration) Join

func (c *OnDiskClusterConfiguration) Join() bool

func (*OnDiskClusterConfiguration) StateMachine

type OnDiskClusterConfigurationInput

type OnDiskClusterConfigurationInput struct {
	ClusterID      uint64                               `json:"clusterID"`
	ClusterName    string                               `json:"clusterName"`
	InitialMembers map[uint64]string                    `json:"initialMembers"`
	Join           bool                                 `json:"join"`
	StateMachine   func(uint64, uint64) iface.IStoraged `json:"-"`
}

type RaftConfiguration

type RaftConfiguration struct {
	RaftConfigurationInput RaftConfigurationInput
	// contains filtered or unexported fields
}

func (*RaftConfiguration) CheckQuorum

func (c *RaftConfiguration) CheckQuorum() bool

func (*RaftConfiguration) CompactionOverhead

func (c *RaftConfiguration) CompactionOverhead() uint64

func (*RaftConfiguration) DisableAutoCompactions

func (c *RaftConfiguration) DisableAutoCompactions() bool

func (*RaftConfiguration) ElectionRTT

func (c *RaftConfiguration) ElectionRTT() uint64

func (*RaftConfiguration) HeartbeatRTT

func (c *RaftConfiguration) HeartbeatRTT() uint64

func (*RaftConfiguration) IsObserver

func (c *RaftConfiguration) IsObserver() bool

func (*RaftConfiguration) IsWitness

func (c *RaftConfiguration) IsWitness() bool

func (*RaftConfiguration) MaxInMemLogSize

func (c *RaftConfiguration) MaxInMemLogSize() uint64

func (*RaftConfiguration) NodeID

func (c *RaftConfiguration) NodeID() uint64

func (*RaftConfiguration) OrderedConfigChange

func (c *RaftConfiguration) OrderedConfigChange() bool

func (*RaftConfiguration) Quiesce

func (c *RaftConfiguration) Quiesce() bool

func (*RaftConfiguration) SnapshotEntries

func (c *RaftConfiguration) SnapshotEntries() uint64

type RaftConfigurationInput

type RaftConfigurationInput struct {
	NodeID       uint64 `json:"nodeId"`
	CheckQuorum  bool   `json:"checkQuorum"`
	ElectionRTT  uint64 `json:"electionRTT"`
	HeartbeatRTT uint64 `json:"heartbeatRTT"`

	SnapshotEntries     uint64 `json:"snapshotEntries"`
	CompactionOverhead  uint64 `json:"compactionOverhead"`
	OrderedConfigChange bool   `json:"orderedConfigChange"`
	MaxInMemLogSize     uint64 `json:"maxInMemLogSize"`

	DisableAutoCompactions bool `json:"disableAutoCompactions"`

	IsObserver bool `json:"isObserver"`
	IsWitness  bool `json:"isWitness"`
	Quiesce    bool `json:"quiesce"`
}

type StoragedConfiguration

type StoragedConfiguration struct {
	StoragedConfigurationInput StoragedConfigurationInput
	TransactionProcessorMap    map[string]iface.ITransactionProcessor
	// contains filtered or unexported fields
}

func (*StoragedConfiguration) AddTransactionProcessor

func (s *StoragedConfiguration) AddTransactionProcessor(tp iface.ITransactionProcessor)

func (*StoragedConfiguration) AutoBuildIndex

func (s *StoragedConfiguration) AutoBuildIndex() bool

func (*StoragedConfiguration) AutoIndexMeta

func (s *StoragedConfiguration) AutoIndexMeta() bool

func (*StoragedConfiguration) BatchSize

func (s *StoragedConfiguration) BatchSize() int

func (*StoragedConfiguration) CacheSize

func (s *StoragedConfiguration) CacheSize() int

func (*StoragedConfiguration) GetTransactionProcessor

func (s *StoragedConfiguration) GetTransactionProcessor(family, version string) iface.ITransactionProcessor

func (*StoragedConfiguration) IndexEnable

func (s *StoragedConfiguration) IndexEnable() bool

func (*StoragedConfiguration) IndexStorageCustomConfiguration

func (s *StoragedConfiguration) IndexStorageCustomConfiguration() interface{}

func (*StoragedConfiguration) IndexStoragePath

func (s *StoragedConfiguration) IndexStoragePath() string

func (*StoragedConfiguration) IndexStorageSecretKey

func (s *StoragedConfiguration) IndexStorageSecretKey() []byte

func (*StoragedConfiguration) IsTransactionProcessorExists

func (s *StoragedConfiguration) IsTransactionProcessorExists(family, version string) bool

func (*StoragedConfiguration) ProposalReceiver

func (s *StoragedConfiguration) ProposalReceiver(proposal *pb.Proposal, status pb.Status)

func (*StoragedConfiguration) QueueSize

func (s *StoragedConfiguration) QueueSize() int

func (*StoragedConfiguration) StateStorageCustomConfiguration

func (s *StoragedConfiguration) StateStorageCustomConfiguration() interface{}

func (*StoragedConfiguration) StateStoragePath

func (s *StoragedConfiguration) StateStoragePath() string

func (*StoragedConfiguration) StateStorageSecretKey

func (s *StoragedConfiguration) StateStorageSecretKey() []byte

func (*StoragedConfiguration) StoragePluginIndex

func (s *StoragedConfiguration) StoragePluginIndex() iface.IIndexStorage

func (*StoragedConfiguration) StoragePluginState

func (s *StoragedConfiguration) StoragePluginState() iface.IStateStorage

func (*StoragedConfiguration) StorageTaskQueue

func (s *StoragedConfiguration) StorageTaskQueue() variant.TaskQueue

type StoragedConfigurationInput

type StoragedConfigurationInput struct {
	CacheSize int `json:"cacheSize"`
	BatchSize int `json:"batchSize"`
	QueueSize int `json:"queueSize"`

	IndexEnable    bool `json:"indexEnable"`
	AutoIndexMeta  bool `json:"autoIndexMeta"`
	AutoBuildIndex bool `json:"autoBuildIndex"`

	StorageTaskQueue variant.TaskQueue `json:"-"`

	StateStoragePath      string `json:"stateStoragePath"`
	StateStorageSecretKey []byte `json:"stateStorageSecretKey"`

	IndexStoragePath      string `json:"indexStoragePath"`
	IndexStorageSecretKey []byte `json:"indexStorageSecretKey"`

	StoragePluginIndex iface.IIndexStorage `json:"-"`
	StoragePluginState iface.IStateStorage `json:"-"`

	StateStorageCustomConfiguration interface{} `json:"-"`
	IndexStorageCustomConfiguration interface{} `json:"-"`

	ProposalReceiver func(*pb.Proposal, pb.Status) `json:"_"`
}

Jump to

Keyboard shortcuts

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