Versions in this module Expand all Collapse all v0 v0.1.0 Nov 3, 2020 Changes in this version + var EmptyMetadata = Metadata + var NoOnDiskState = OnDiskState + type Address struct + type AliasMetadata struct + Alias string + type BoundAddress struct + type ClusterBlocks struct + type ClusterChangedEvent struct + PrevState ClusterState + State ClusterState + func (e *ClusterChangedEvent) IndicesDeleted() []Index + type ClusterService interface + State func() *ClusterState + SubmitStateUpdateTask func(task ClusterStateUpdateTask) + type ClusterState struct + Metadata Metadata + Name string + Nodes *Nodes + RoutingTable RoutingTable + StateUUID string + Version int64 + func ClusterStateFromBytes(b []byte, localNode Node) *ClusterState + func (c *ClusterState) ToBytes() []byte + type ClusterStateUpdateTask func(s ClusterState) ClusterState + type CoordinationState struct + ElectionWon bool + JoinVotes *VoteCollection + LocalNode *Node + PersistedState PersistedState + PublishVotes *VoteCollection + Term int64 + func (c *CoordinationState) IsElectionQuorum(nodes []string) bool + type Index struct + Name string + Uuid string + type IndexAbstractionAlias struct + AliasName string + WriteIndex IndexMetadata + type IndexMetadata struct + Aliases map[string]AliasMetadata + Index Index + Mapping map[string]MappingMetadata + NumberOfShards int + type IndexMetadataState int + const CLOSE + const OPEN + type IndexRoutingTable struct + Index Index + Shards map[int]IndexShardRoutingTable + type IndexShardRoutingTable struct + Primary ShardRouting + ShardId ShardId + type Join struct + SourceNode Node + TargetNode Node + Term int64 + func NewJoin(sourceNode Node, targetNode Node, term int64) *Join + type MappingMetadata struct + Source []byte + Type string + type Metadata struct + Indices map[string]IndexMetadata + IndicesLookup map[string]IndexAbstractionAlias + func (m *Metadata) FindAliases(aliases []string, concreteIndices []string) map[string][]AliasMetadata + type Node struct + HostAddress string + Id string + Name string + func CreateLocalNode(id string, address string, name string) *Node + func NodeFromBytes(b []byte) *Node + func (n *Node) ToBytes() []byte + type Nodes struct + DataNodes map[string]Node + LocalNodeId string + MasterNodeId string + MasterNodes map[string]Node + Nodes map[string]Node + func (n *Nodes) MasterNode() Node + type OnDiskState struct + CurrentTerm int64 + DataPath string + Id string + LastAcceptedVersion int64 + Metadata Metadata + type PersistedState interface + GetLastAcceptedState func() *ClusterState + SetLastAcceptedState func(state *ClusterState) + type RoutingNode struct + NodeId string + Shards map[ShardId]ShardRouting + ShardsByIndex map[string]map[ShardRouting]struct{} + func (n *RoutingNode) Add(shard ShardRouting) + func (n *RoutingNode) NumShards() int + func (n *RoutingNode) NumShardsOfIndex(index string) int + type RoutingNodes struct + NodesToShards map[string]*RoutingNode + UnassignedShards []*ShardRouting + func NewRoutingNodes(clusterState ClusterState) *RoutingNodes + type RoutingTable struct + IndicesRouting map[string]IndexRoutingTable + type ShardId struct + Index Index + ShardId int + type ShardRouting struct + CurrentNodeId string + Primary bool + ShardId ShardId + type VoteCollection struct + func NewVoteCollection() *VoteCollection + func (v *VoteCollection) AddJoinVote(join Join) bool + func (v *VoteCollection) AddVote(sourceNode *Node) bool + func (v *VoteCollection) IsQuorum(nodes []string) bool + type VotingConfiguration struct + NodeIds []string + func NewVotingConfiguration() *VotingConfiguration