Documentation ¶
Index ¶
- func IsIntType(k reflect.Kind) (size int, okay bool)
- type FSM
- type IndexEntry
- type IntFieldIndex
- type NodeID
- type Restore
- type Snapshot
- type Store
- func (s *Store) Abandon()
- func (s *Store) AbandonCh() <-chan struct{}
- func (s *Store) DeleteGroup(idx uint64, group string) error
- func (s *Store) DeleteNode(idx uint64, id int32) error
- func (s *Store) DeletePartition(idx uint64, topic string, partition int32) error
- func (s *Store) DeleteTopic(idx uint64, id string) error
- func (s *Store) EnsureGroup(idx uint64, group *structs.Group) error
- func (s *Store) EnsureNode(idx uint64, node *structs.Node) error
- func (s *Store) EnsurePartition(idx uint64, partition *structs.Partition) error
- func (s *Store) EnsureRegistration(idx uint64, req *structs.RegisterNodeRequest) error
- func (s *Store) EnsureTopic(idx uint64, topic *structs.Topic) error
- func (s *Store) GetGroup(id string) (uint64, *structs.Group, error)
- func (s *Store) GetGroups() (uint64, []*structs.Group, error)
- func (s *Store) GetGroupsByCoordinator(coordinator int32) (uint64, []*structs.Group, error)
- func (s *Store) GetNode(id int32) (uint64, *structs.Node, error)
- func (s *Store) GetNodes() (uint64, []*structs.Node, error)
- func (s *Store) GetPartition(topic string, id int32) (uint64, *structs.Partition, error)
- func (s *Store) GetPartitions() (uint64, []*structs.Partition, error)
- func (s *Store) GetTopic(id string) (uint64, *structs.Topic, error)
- func (s *Store) GetTopics() (uint64, []*structs.Topic, error)
- func (s *Store) PartitionsByLeader(leader int32) (uint64, []*structs.Partition, error)
- func (s *Store) Restore() *Restore
- func (s *Store) Snapshot() *Snapshot
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
FSM implements a finite state machine used with Raft to provide strong consistency.
type IndexEntry ¶
IndexEntry keeps a record of the last index per-table.
type IntFieldIndex ¶
type IntFieldIndex struct {
Field string
}
IntFieldIndex is used to extract a int field from an object using reflection and builds an index on that field.
func (*IntFieldIndex) FromArgs ¶
func (u *IntFieldIndex) FromArgs(args ...interface{}) ([]byte, error)
func (*IntFieldIndex) FromObject ¶
func (u *IntFieldIndex) FromObject(obj interface{}) (bool, []byte, error)
type Restore ¶
type Restore struct {
// contains filtered or unexported fields
}
Restore is used to manage restoring a large amount of data into the state store. It works by doing all the restores inside of a single transaction.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is used to provide a point-in-time snapshot. It works by startinga read transaction against the whole state store.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Abandon ¶
func (s *Store) Abandon()
Abandon is used to signal that the given state store has been abandoned. Calling this more than one time will panic.
func (*Store) AbandonCh ¶
func (s *Store) AbandonCh() <-chan struct{}
AbandonCh returns a channel you can wait on to know if the state store was abandoned.
func (*Store) DeleteGroup ¶
DeleteGroup is used to delete groups.
func (*Store) DeleteNode ¶
DeleteNode is used to delete nodes.
func (*Store) DeletePartition ¶
DeletePartition is used to delete partitions.
func (*Store) DeleteTopic ¶
DeleteTopic is used to delete topics.
func (*Store) EnsureNode ¶
EnsureNode is used to upsert nodes.
func (*Store) EnsurePartition ¶
func (*Store) EnsureRegistration ¶
func (s *Store) EnsureRegistration(idx uint64, req *structs.RegisterNodeRequest) error
func (*Store) GetGroupsByCoordinator ¶
GetGroupsByCoordinator looks up groups with the given coordinator.
func (*Store) GetPartition ¶
GetPartition is used to get partitions.
func (*Store) PartitionsByLeader ¶
PartitionsByLeader is used to return all partitions for the given leader.
type Tracer ¶
type Tracer opentracing.Tracer