Documentation ¶
Overview ¶
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func RegisterService(node *rsm.Node)
- type AddProposal
- type AddProposals
- type ClearProposal
- type ClearProposals
- type ContainsQuery
- type ElementsQuery
- type EventsProposal
- type EventsProposals
- type NewServiceFunc
- type Proposal
- type ProposalID
- type ProposalState
- type Proposals
- type Query
- type RemoveProposal
- type RemoveProposals
- type Service
- type ServiceAdaptor
- type ServiceContext
- type Session
- type SessionID
- type SessionState
- type Sessions
- type SetState
- func (*SetState) Descriptor() ([]byte, []int)
- func (m *SetState) GetValues() []SetValue
- func (m *SetState) Marshal() (dAtA []byte, err error)
- func (m *SetState) MarshalTo(dAtA []byte) (int, error)
- func (m *SetState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SetState) ProtoMessage()
- func (m *SetState) Reset()
- func (m *SetState) Size() (n int)
- func (m *SetState) String() string
- func (m *SetState) Unmarshal(dAtA []byte) error
- func (m *SetState) XXX_DiscardUnknown()
- func (m *SetState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetState) XXX_Merge(src proto.Message)
- func (m *SetState) XXX_Size() int
- func (m *SetState) XXX_Unmarshal(b []byte) error
- type SetValue
- func (*SetValue) Descriptor() ([]byte, []int)
- func (m *SetValue) GetValue() string
- func (m *SetValue) Marshal() (dAtA []byte, err error)
- func (m *SetValue) MarshalTo(dAtA []byte) (int, error)
- func (m *SetValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SetValue) ProtoMessage()
- func (m *SetValue) Reset()
- func (m *SetValue) Size() (n int)
- func (m *SetValue) String() string
- func (m *SetValue) Unmarshal(dAtA []byte) error
- func (m *SetValue) XXX_DiscardUnknown()
- func (m *SetValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetValue) XXX_Merge(src proto.Message)
- func (m *SetValue) XXX_Size() int
- func (m *SetValue) XXX_Unmarshal(b []byte) error
- type SizeQuery
- type SnapshotReader
- type SnapshotWriter
- type Watcher
Constants ¶
View Source
const Type = "Set"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type AddProposal ¶
type AddProposal interface { Proposal Request() *set.AddRequest }
type AddProposals ¶
type AddProposals interface { Get(ProposalID) (AddProposal, bool) List() []AddProposal }
type ClearProposal ¶
type ClearProposal interface { Proposal Request() *set.ClearRequest }
type ClearProposals ¶
type ClearProposals interface { Get(ProposalID) (ClearProposal, bool) List() []ClearProposal }
type ContainsQuery ¶ added in v0.9.1
type ContainsQuery interface { Query Request() *set.ContainsRequest }
type ElementsQuery ¶ added in v0.9.1
type ElementsQuery interface { Query Request() *set.ElementsRequest Notify(*set.ElementsResponse) Close() }
type EventsProposal ¶
type EventsProposal interface { Proposal Request() *set.EventsRequest Notify(*set.EventsResponse) Close() }
type EventsProposals ¶
type EventsProposals interface { Get(ProposalID) (EventsProposal, bool) List() []EventsProposal }
type NewServiceFunc ¶
type NewServiceFunc func(ServiceContext) Service
type Proposal ¶
type Proposal interface { fmt.Stringer ID() ProposalID Session() Session State() ProposalState Watch(func(ProposalState)) Watcher }
type ProposalID ¶
type ProposalID uint64
type ProposalState ¶ added in v0.9.1
type ProposalState int
const ( ProposalComplete ProposalState = iota ProposalOpen )
type Proposals ¶
type Proposals interface { Add() AddProposals Remove() RemoveProposals Clear() ClearProposals Events() EventsProposals }
type RemoveProposal ¶
type RemoveProposal interface { Proposal Request() *set.RemoveRequest }
type RemoveProposals ¶
type RemoveProposals interface { Get(ProposalID) (RemoveProposal, bool) List() []RemoveProposal }
type Service ¶
type Service interface { ServiceContext Backup(SnapshotWriter) error Restore(SnapshotReader) error // Size gets the number of elements in the set Size(SizeQuery) (*set.SizeResponse, error) // Contains returns whether the set contains a value Contains(ContainsQuery) (*set.ContainsResponse, error) // Add adds a value to the set Add(AddProposal) (*set.AddResponse, error) // Remove removes a value from the set Remove(RemoveProposal) (*set.RemoveResponse, error) // Clear removes all values from the set Clear(ClearProposal) (*set.ClearResponse, error) // Events listens for set change events Events(EventsProposal) // Elements lists all elements in the set Elements(ElementsQuery) }
type ServiceAdaptor ¶
type ServiceAdaptor struct { rsm.ServiceContext // contains filtered or unexported fields }
func (*ServiceAdaptor) ExecuteCommand ¶ added in v0.9.1
func (s *ServiceAdaptor) ExecuteCommand(command rsm.Command)
func (*ServiceAdaptor) ExecuteQuery ¶ added in v0.9.1
func (s *ServiceAdaptor) ExecuteQuery(query rsm.Query)
type ServiceContext ¶
type Session ¶
type Session interface { ID() SessionID State() SessionState Watch(func(SessionState)) Watcher Proposals() Proposals }
type SetState ¶
type SetState struct {
Values []SetValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"`
}
func (*SetState) Descriptor ¶
func (*SetState) MarshalToSizedBuffer ¶
func (*SetState) ProtoMessage ¶
func (*SetState) ProtoMessage()
func (*SetState) XXX_DiscardUnknown ¶
func (m *SetState) XXX_DiscardUnknown()
func (*SetState) XXX_Marshal ¶
func (*SetState) XXX_Unmarshal ¶
type SetValue ¶
type SetValue struct { meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*SetValue) Descriptor ¶
func (*SetValue) MarshalToSizedBuffer ¶
func (*SetValue) ProtoMessage ¶
func (*SetValue) ProtoMessage()
func (*SetValue) XXX_DiscardUnknown ¶
func (m *SetValue) XXX_DiscardUnknown()
func (*SetValue) XXX_Marshal ¶
func (*SetValue) XXX_Unmarshal ¶
type SizeQuery ¶ added in v0.9.1
type SizeQuery interface { Query Request() *set.SizeRequest }
type SnapshotReader ¶
type SnapshotWriter ¶
Click to show internal directories.
Click to hide internal directories.