Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct {
Namespaces []NamespaceConfig `json:"namespaces" yaml:"namespaces"`
Servers []ServerAddress `json:"servers" yaml:"servers"`
}
type ClusterStatus ¶
type ClusterStatus struct {
Namespaces map[string]NamespaceStatus `json:"namespaces" yaml:"namespaces"`
ShardIdGenerator int64 `json:"shardIdGenerator" yaml:"shardIdGenerator"`
ServerIdx uint32 `json:"serverIdx" yaml:"serverIdx"`
}
func NewClusterStatus ¶
func NewClusterStatus() *ClusterStatus
func (ClusterStatus) Clone ¶
func (c ClusterStatus) Clone() *ClusterStatus
type Int32HashRange ¶
type Int32HashRange struct {
// The minimum inclusive hash that the shard can contain
Min uint32 `json:"min"`
// The maximum inclusive hash that the shard can contain
Max uint32 `json:"max"`
}
func (Int32HashRange) Clone ¶
func (sm Int32HashRange) Clone() Int32HashRange
type NamespaceConfig ¶
type NamespaceStatus ¶
type NamespaceStatus struct {
ReplicationFactor uint32 `json:"replicationFactor" yaml:"replicationFactor"`
Shards map[int64]ShardMetadata `json:"shards" yaml:"shards"`
}
func (NamespaceStatus) Clone ¶
func (n NamespaceStatus) Clone() NamespaceStatus
type ServerAddress ¶
type ShardMetadata ¶
type ShardMetadata struct {
Status ShardStatus `json:"status" yaml:"status"`
Term int64 `json:"term" yaml:"term"`
Leader *ServerAddress `json:"leader" yaml:"leader"`
Ensemble []ServerAddress `json:"ensemble" yaml:"ensemble"`
RemovedNodes []ServerAddress `json:"removedNodes" yaml:"removedNodes"`
Int32HashRange Int32HashRange `json:"int32HashRange" yaml:"int32HashRange"`
}
func (ShardMetadata) Clone ¶
func (sm ShardMetadata) Clone() ShardMetadata
type ShardStatus ¶
type ShardStatus uint16
const ( ShardStatusUnknown ShardStatus = iota ShardStatusSteadyState ShardStatusElection ShardStatusDeleting )
func (ShardStatus) MarshalJSON ¶
func (s ShardStatus) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (ShardStatus) String ¶
func (s ShardStatus) String() string
func (*ShardStatus) UnmarshalJSON ¶
func (s *ShardStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a quoted json string to the enum value
Click to show internal directories.
Click to hide internal directories.