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 AppendProposal
- type AppendProposals
- type ClearProposal
- type ClearProposals
- type ElementsQuery
- type EventsProposal
- type EventsProposals
- type GetQuery
- type InsertProposal
- type InsertProposals
- type ListState
- func (*ListState) Descriptor() ([]byte, []int)
- func (m *ListState) GetValues() []ListValue
- func (m *ListState) Marshal() (dAtA []byte, err error)
- func (m *ListState) MarshalTo(dAtA []byte) (int, error)
- func (m *ListState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListState) ProtoMessage()
- func (m *ListState) Reset()
- func (m *ListState) Size() (n int)
- func (m *ListState) String() string
- func (m *ListState) Unmarshal(dAtA []byte) error
- func (m *ListState) XXX_DiscardUnknown()
- func (m *ListState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListState) XXX_Merge(src proto.Message)
- func (m *ListState) XXX_Size() int
- func (m *ListState) XXX_Unmarshal(b []byte) error
- type ListValue
- func (*ListValue) Descriptor() ([]byte, []int)
- func (m *ListValue) GetValue() string
- func (m *ListValue) Marshal() (dAtA []byte, err error)
- func (m *ListValue) MarshalTo(dAtA []byte) (int, error)
- func (m *ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListValue) ProtoMessage()
- func (m *ListValue) Reset()
- func (m *ListValue) Size() (n int)
- func (m *ListValue) String() string
- func (m *ListValue) Unmarshal(dAtA []byte) error
- func (m *ListValue) XXX_DiscardUnknown()
- func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListValue) XXX_Merge(src proto.Message)
- func (m *ListValue) XXX_Size() int
- func (m *ListValue) XXX_Unmarshal(b []byte) error
- 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 SetProposal
- type SetProposals
- type SizeQuery
- type SnapshotReader
- type SnapshotWriter
- type Watcher
Constants ¶
View Source
const Type = "List"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type AppendProposal ¶
type AppendProposal interface { Proposal Request() *list.AppendRequest }
type AppendProposals ¶
type AppendProposals interface { Get(ProposalID) (AppendProposal, bool) List() []AppendProposal }
type ClearProposal ¶
type ClearProposal interface { Proposal Request() *list.ClearRequest }
type ClearProposals ¶
type ClearProposals interface { Get(ProposalID) (ClearProposal, bool) List() []ClearProposal }
type ElementsQuery ¶ added in v0.9.1
type ElementsQuery interface { Query Request() *list.ElementsRequest Notify(*list.ElementsResponse) Close() }
type EventsProposal ¶
type EventsProposal interface { Proposal Request() *list.EventsRequest Notify(*list.EventsResponse) Close() }
type EventsProposals ¶
type EventsProposals interface { Get(ProposalID) (EventsProposal, bool) List() []EventsProposal }
type GetQuery ¶ added in v0.9.1
type GetQuery interface { Query Request() *list.GetRequest }
type InsertProposal ¶
type InsertProposal interface { Proposal Request() *list.InsertRequest }
type InsertProposals ¶
type InsertProposals interface { Get(ProposalID) (InsertProposal, bool) List() []InsertProposal }
type ListState ¶
type ListState struct {
Values []ListValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"`
}
func (*ListState) Descriptor ¶
func (*ListState) MarshalToSizedBuffer ¶
func (*ListState) ProtoMessage ¶
func (*ListState) ProtoMessage()
func (*ListState) XXX_DiscardUnknown ¶
func (m *ListState) XXX_DiscardUnknown()
func (*ListState) XXX_Marshal ¶
func (*ListState) XXX_Unmarshal ¶
type ListValue ¶
type ListValue 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 (*ListValue) Descriptor ¶
func (*ListValue) MarshalToSizedBuffer ¶
func (*ListValue) ProtoMessage ¶
func (*ListValue) ProtoMessage()
func (*ListValue) XXX_DiscardUnknown ¶
func (m *ListValue) XXX_DiscardUnknown()
func (*ListValue) XXX_Marshal ¶
func (*ListValue) XXX_Unmarshal ¶
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 { Append() AppendProposals Insert() InsertProposals Set() SetProposals Remove() RemoveProposals Clear() ClearProposals Events() EventsProposals }
type RemoveProposal ¶
type RemoveProposal interface { Proposal Request() *list.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 list Size(SizeQuery) (*list.SizeResponse, error) // Append appends a value to the list Append(AppendProposal) (*list.AppendResponse, error) // Insert inserts a value at a specific index in the list Insert(InsertProposal) (*list.InsertResponse, error) // Get gets the value at an index in the list Get(GetQuery) (*list.GetResponse, error) // Set sets the value at an index in the list Set(SetProposal) (*list.SetResponse, error) // Remove removes an element from the list Remove(RemoveProposal) (*list.RemoveResponse, error) // Clear removes all elements from the list Clear(ClearProposal) (*list.ClearResponse, error) // Events listens for change events Events(EventsProposal) // Elements streams all elements in the list 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 SetProposal ¶
type SetProposal interface { Proposal Request() *list.SetRequest }
type SetProposals ¶
type SetProposals interface { Get(ProposalID) (SetProposal, bool) List() []SetProposal }
type SizeQuery ¶ added in v0.9.1
type SizeQuery interface { Query Request() *list.SizeRequest }
type SnapshotReader ¶
type SnapshotWriter ¶
Click to show internal directories.
Click to hide internal directories.