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 ClearProposal
- type ClearProposals
- type EntriesQuery
- type EventsProposal
- type EventsProposals
- type FirstEntryQuery
- type GetQuery
- type IndexedMapEntry
- func (*IndexedMapEntry) Descriptor() ([]byte, []int)
- func (m *IndexedMapEntry) Marshal() (dAtA []byte, err error)
- func (m *IndexedMapEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexedMapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexedMapEntry) ProtoMessage()
- func (m *IndexedMapEntry) Reset()
- func (m *IndexedMapEntry) Size() (n int)
- func (m *IndexedMapEntry) String() string
- func (m *IndexedMapEntry) Unmarshal(dAtA []byte) error
- func (m *IndexedMapEntry) XXX_DiscardUnknown()
- func (m *IndexedMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexedMapEntry) XXX_Merge(src proto.Message)
- func (m *IndexedMapEntry) XXX_Size() int
- func (m *IndexedMapEntry) XXX_Unmarshal(b []byte) error
- type IndexedMapEntryPosition
- func (*IndexedMapEntryPosition) Descriptor() ([]byte, []int)
- func (m *IndexedMapEntryPosition) GetIndex() uint64
- func (m *IndexedMapEntryPosition) GetKey() string
- func (m *IndexedMapEntryPosition) Marshal() (dAtA []byte, err error)
- func (m *IndexedMapEntryPosition) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexedMapEntryPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexedMapEntryPosition) ProtoMessage()
- func (m *IndexedMapEntryPosition) Reset()
- func (m *IndexedMapEntryPosition) Size() (n int)
- func (m *IndexedMapEntryPosition) String() string
- func (m *IndexedMapEntryPosition) Unmarshal(dAtA []byte) error
- func (m *IndexedMapEntryPosition) XXX_DiscardUnknown()
- func (m *IndexedMapEntryPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexedMapEntryPosition) XXX_Merge(src proto.Message)
- func (m *IndexedMapEntryPosition) XXX_Size() int
- func (m *IndexedMapEntryPosition) XXX_Unmarshal(b []byte) error
- type IndexedMapEntryValue
- func (*IndexedMapEntryValue) Descriptor() ([]byte, []int)
- func (m *IndexedMapEntryValue) GetExpire() *time.Time
- func (m *IndexedMapEntryValue) GetValue() []byte
- func (m *IndexedMapEntryValue) Marshal() (dAtA []byte, err error)
- func (m *IndexedMapEntryValue) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexedMapEntryValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexedMapEntryValue) ProtoMessage()
- func (m *IndexedMapEntryValue) Reset()
- func (m *IndexedMapEntryValue) Size() (n int)
- func (m *IndexedMapEntryValue) String() string
- func (m *IndexedMapEntryValue) Unmarshal(dAtA []byte) error
- func (m *IndexedMapEntryValue) XXX_DiscardUnknown()
- func (m *IndexedMapEntryValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexedMapEntryValue) XXX_Merge(src proto.Message)
- func (m *IndexedMapEntryValue) XXX_Size() int
- func (m *IndexedMapEntryValue) XXX_Unmarshal(b []byte) error
- type IndexedMapState
- func (*IndexedMapState) Descriptor() ([]byte, []int)
- func (m *IndexedMapState) GetEntries() []IndexedMapEntry
- func (m *IndexedMapState) GetListeners() []IndexedMapStateListener
- func (m *IndexedMapState) Marshal() (dAtA []byte, err error)
- func (m *IndexedMapState) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexedMapState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexedMapState) ProtoMessage()
- func (m *IndexedMapState) Reset()
- func (m *IndexedMapState) Size() (n int)
- func (m *IndexedMapState) String() string
- func (m *IndexedMapState) Unmarshal(dAtA []byte) error
- func (m *IndexedMapState) XXX_DiscardUnknown()
- func (m *IndexedMapState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexedMapState) XXX_Merge(src proto.Message)
- func (m *IndexedMapState) XXX_Size() int
- func (m *IndexedMapState) XXX_Unmarshal(b []byte) error
- type IndexedMapStateListener
- func (*IndexedMapStateListener) Descriptor() ([]byte, []int)
- func (m *IndexedMapStateListener) GetIndex() uint64
- func (m *IndexedMapStateListener) GetKey() string
- func (m *IndexedMapStateListener) GetProposalID() ProposalID
- func (m *IndexedMapStateListener) Marshal() (dAtA []byte, err error)
- func (m *IndexedMapStateListener) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexedMapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexedMapStateListener) ProtoMessage()
- func (m *IndexedMapStateListener) Reset()
- func (m *IndexedMapStateListener) Size() (n int)
- func (m *IndexedMapStateListener) String() string
- func (m *IndexedMapStateListener) Unmarshal(dAtA []byte) error
- func (m *IndexedMapStateListener) XXX_DiscardUnknown()
- func (m *IndexedMapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexedMapStateListener) XXX_Merge(src proto.Message)
- func (m *IndexedMapStateListener) XXX_Size() int
- func (m *IndexedMapStateListener) XXX_Unmarshal(b []byte) error
- type LastEntryQuery
- type LinkedMapEntryValue
- type NewServiceFunc
- type NextEntryQuery
- type PrevEntryQuery
- type Proposal
- type ProposalID
- type ProposalState
- type Proposals
- type PutProposal
- type PutProposals
- type Query
- type RemoveProposal
- type RemoveProposals
- type Service
- type ServiceAdaptor
- type ServiceContext
- type Session
- type SessionID
- type SessionState
- type Sessions
- type SizeQuery
- type SnapshotReader
- type SnapshotWriter
- type Watcher
Constants ¶
View Source
const Type = "IndexedMap"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type ClearProposal ¶
type ClearProposal interface { Proposal Request() *indexedmap.ClearRequest }
type ClearProposals ¶
type ClearProposals interface { Get(ProposalID) (ClearProposal, bool) List() []ClearProposal }
type EntriesQuery ¶ added in v0.9.1
type EntriesQuery interface { Query Request() *indexedmap.EntriesRequest Notify(*indexedmap.EntriesResponse) Close() }
type EventsProposal ¶
type EventsProposal interface { Proposal Request() *indexedmap.EventsRequest Notify(*indexedmap.EventsResponse) Close() }
type EventsProposals ¶
type EventsProposals interface { Get(ProposalID) (EventsProposal, bool) List() []EventsProposal }
type FirstEntryQuery ¶ added in v0.9.1
type FirstEntryQuery interface { Query Request() *indexedmap.FirstEntryRequest }
type GetQuery ¶ added in v0.9.1
type GetQuery interface { Query Request() *indexedmap.GetRequest }
type IndexedMapEntry ¶
type IndexedMapEntry struct { IndexedMapEntryPosition `protobuf:"bytes,1,opt,name=pos,proto3,embedded=pos" json:"pos"` IndexedMapEntryValue `protobuf:"bytes,2,opt,name=value,proto3,embedded=value" json:"value"` }
func (*IndexedMapEntry) Descriptor ¶
func (*IndexedMapEntry) Descriptor() ([]byte, []int)
func (*IndexedMapEntry) Marshal ¶
func (m *IndexedMapEntry) Marshal() (dAtA []byte, err error)
func (*IndexedMapEntry) MarshalToSizedBuffer ¶
func (m *IndexedMapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexedMapEntry) ProtoMessage ¶
func (*IndexedMapEntry) ProtoMessage()
func (*IndexedMapEntry) Reset ¶
func (m *IndexedMapEntry) Reset()
func (*IndexedMapEntry) Size ¶
func (m *IndexedMapEntry) Size() (n int)
func (*IndexedMapEntry) String ¶
func (m *IndexedMapEntry) String() string
func (*IndexedMapEntry) Unmarshal ¶
func (m *IndexedMapEntry) Unmarshal(dAtA []byte) error
func (*IndexedMapEntry) XXX_DiscardUnknown ¶
func (m *IndexedMapEntry) XXX_DiscardUnknown()
func (*IndexedMapEntry) XXX_Marshal ¶
func (m *IndexedMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexedMapEntry) XXX_Merge ¶
func (m *IndexedMapEntry) XXX_Merge(src proto.Message)
func (*IndexedMapEntry) XXX_Size ¶
func (m *IndexedMapEntry) XXX_Size() int
func (*IndexedMapEntry) XXX_Unmarshal ¶
func (m *IndexedMapEntry) XXX_Unmarshal(b []byte) error
type IndexedMapEntryPosition ¶
type IndexedMapEntryPosition struct { Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` }
func (*IndexedMapEntryPosition) Descriptor ¶
func (*IndexedMapEntryPosition) Descriptor() ([]byte, []int)
func (*IndexedMapEntryPosition) GetIndex ¶
func (m *IndexedMapEntryPosition) GetIndex() uint64
func (*IndexedMapEntryPosition) GetKey ¶
func (m *IndexedMapEntryPosition) GetKey() string
func (*IndexedMapEntryPosition) Marshal ¶
func (m *IndexedMapEntryPosition) Marshal() (dAtA []byte, err error)
func (*IndexedMapEntryPosition) MarshalTo ¶
func (m *IndexedMapEntryPosition) MarshalTo(dAtA []byte) (int, error)
func (*IndexedMapEntryPosition) MarshalToSizedBuffer ¶
func (m *IndexedMapEntryPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexedMapEntryPosition) ProtoMessage ¶
func (*IndexedMapEntryPosition) ProtoMessage()
func (*IndexedMapEntryPosition) Reset ¶
func (m *IndexedMapEntryPosition) Reset()
func (*IndexedMapEntryPosition) Size ¶
func (m *IndexedMapEntryPosition) Size() (n int)
func (*IndexedMapEntryPosition) String ¶
func (m *IndexedMapEntryPosition) String() string
func (*IndexedMapEntryPosition) Unmarshal ¶
func (m *IndexedMapEntryPosition) Unmarshal(dAtA []byte) error
func (*IndexedMapEntryPosition) XXX_DiscardUnknown ¶
func (m *IndexedMapEntryPosition) XXX_DiscardUnknown()
func (*IndexedMapEntryPosition) XXX_Marshal ¶
func (m *IndexedMapEntryPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexedMapEntryPosition) XXX_Merge ¶
func (m *IndexedMapEntryPosition) XXX_Merge(src proto.Message)
func (*IndexedMapEntryPosition) XXX_Size ¶
func (m *IndexedMapEntryPosition) XXX_Size() int
func (*IndexedMapEntryPosition) XXX_Unmarshal ¶
func (m *IndexedMapEntryPosition) XXX_Unmarshal(b []byte) error
type IndexedMapEntryValue ¶
type IndexedMapEntryValue struct { meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Expire *time.Time `protobuf:"bytes,3,opt,name=expire,proto3,stdtime" json:"expire,omitempty"` }
func (*IndexedMapEntryValue) Descriptor ¶
func (*IndexedMapEntryValue) Descriptor() ([]byte, []int)
func (*IndexedMapEntryValue) GetExpire ¶
func (m *IndexedMapEntryValue) GetExpire() *time.Time
func (*IndexedMapEntryValue) GetValue ¶
func (m *IndexedMapEntryValue) GetValue() []byte
func (*IndexedMapEntryValue) Marshal ¶
func (m *IndexedMapEntryValue) Marshal() (dAtA []byte, err error)
func (*IndexedMapEntryValue) MarshalTo ¶
func (m *IndexedMapEntryValue) MarshalTo(dAtA []byte) (int, error)
func (*IndexedMapEntryValue) MarshalToSizedBuffer ¶
func (m *IndexedMapEntryValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexedMapEntryValue) ProtoMessage ¶
func (*IndexedMapEntryValue) ProtoMessage()
func (*IndexedMapEntryValue) Reset ¶
func (m *IndexedMapEntryValue) Reset()
func (*IndexedMapEntryValue) Size ¶
func (m *IndexedMapEntryValue) Size() (n int)
func (*IndexedMapEntryValue) String ¶
func (m *IndexedMapEntryValue) String() string
func (*IndexedMapEntryValue) Unmarshal ¶
func (m *IndexedMapEntryValue) Unmarshal(dAtA []byte) error
func (*IndexedMapEntryValue) XXX_DiscardUnknown ¶
func (m *IndexedMapEntryValue) XXX_DiscardUnknown()
func (*IndexedMapEntryValue) XXX_Marshal ¶
func (m *IndexedMapEntryValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexedMapEntryValue) XXX_Merge ¶
func (m *IndexedMapEntryValue) XXX_Merge(src proto.Message)
func (*IndexedMapEntryValue) XXX_Size ¶
func (m *IndexedMapEntryValue) XXX_Size() int
func (*IndexedMapEntryValue) XXX_Unmarshal ¶
func (m *IndexedMapEntryValue) XXX_Unmarshal(b []byte) error
type IndexedMapState ¶
type IndexedMapState struct { Listeners []IndexedMapStateListener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners"` Entries []IndexedMapEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` }
func (*IndexedMapState) Descriptor ¶
func (*IndexedMapState) Descriptor() ([]byte, []int)
func (*IndexedMapState) GetEntries ¶
func (m *IndexedMapState) GetEntries() []IndexedMapEntry
func (*IndexedMapState) GetListeners ¶
func (m *IndexedMapState) GetListeners() []IndexedMapStateListener
func (*IndexedMapState) Marshal ¶
func (m *IndexedMapState) Marshal() (dAtA []byte, err error)
func (*IndexedMapState) MarshalToSizedBuffer ¶
func (m *IndexedMapState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexedMapState) ProtoMessage ¶
func (*IndexedMapState) ProtoMessage()
func (*IndexedMapState) Reset ¶
func (m *IndexedMapState) Reset()
func (*IndexedMapState) Size ¶
func (m *IndexedMapState) Size() (n int)
func (*IndexedMapState) String ¶
func (m *IndexedMapState) String() string
func (*IndexedMapState) Unmarshal ¶
func (m *IndexedMapState) Unmarshal(dAtA []byte) error
func (*IndexedMapState) XXX_DiscardUnknown ¶
func (m *IndexedMapState) XXX_DiscardUnknown()
func (*IndexedMapState) XXX_Marshal ¶
func (m *IndexedMapState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexedMapState) XXX_Merge ¶
func (m *IndexedMapState) XXX_Merge(src proto.Message)
func (*IndexedMapState) XXX_Size ¶
func (m *IndexedMapState) XXX_Size() int
func (*IndexedMapState) XXX_Unmarshal ¶
func (m *IndexedMapState) XXX_Unmarshal(b []byte) error
type IndexedMapStateListener ¶
type IndexedMapStateListener struct { ProposalID ProposalID `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3,casttype=ProposalID" json:"proposal_id,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Index uint64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` }
func (*IndexedMapStateListener) Descriptor ¶
func (*IndexedMapStateListener) Descriptor() ([]byte, []int)
func (*IndexedMapStateListener) GetIndex ¶
func (m *IndexedMapStateListener) GetIndex() uint64
func (*IndexedMapStateListener) GetKey ¶
func (m *IndexedMapStateListener) GetKey() string
func (*IndexedMapStateListener) GetProposalID ¶
func (m *IndexedMapStateListener) GetProposalID() ProposalID
func (*IndexedMapStateListener) Marshal ¶
func (m *IndexedMapStateListener) Marshal() (dAtA []byte, err error)
func (*IndexedMapStateListener) MarshalTo ¶
func (m *IndexedMapStateListener) MarshalTo(dAtA []byte) (int, error)
func (*IndexedMapStateListener) MarshalToSizedBuffer ¶
func (m *IndexedMapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexedMapStateListener) ProtoMessage ¶
func (*IndexedMapStateListener) ProtoMessage()
func (*IndexedMapStateListener) Reset ¶
func (m *IndexedMapStateListener) Reset()
func (*IndexedMapStateListener) Size ¶
func (m *IndexedMapStateListener) Size() (n int)
func (*IndexedMapStateListener) String ¶
func (m *IndexedMapStateListener) String() string
func (*IndexedMapStateListener) Unmarshal ¶
func (m *IndexedMapStateListener) Unmarshal(dAtA []byte) error
func (*IndexedMapStateListener) XXX_DiscardUnknown ¶
func (m *IndexedMapStateListener) XXX_DiscardUnknown()
func (*IndexedMapStateListener) XXX_Marshal ¶
func (m *IndexedMapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexedMapStateListener) XXX_Merge ¶
func (m *IndexedMapStateListener) XXX_Merge(src proto.Message)
func (*IndexedMapStateListener) XXX_Size ¶
func (m *IndexedMapStateListener) XXX_Size() int
func (*IndexedMapStateListener) XXX_Unmarshal ¶
func (m *IndexedMapStateListener) XXX_Unmarshal(b []byte) error
type LastEntryQuery ¶ added in v0.9.1
type LastEntryQuery interface { Query Request() *indexedmap.LastEntryRequest }
type LinkedMapEntryValue ¶
type LinkedMapEntryValue struct { *IndexedMapEntry Prev *LinkedMapEntryValue Next *LinkedMapEntryValue }
LinkedMapEntryValue is a doubly linked MapEntryValue
type NewServiceFunc ¶
type NewServiceFunc func(ServiceContext) Service
type NextEntryQuery ¶ added in v0.9.1
type NextEntryQuery interface { Query Request() *indexedmap.NextEntryRequest }
type PrevEntryQuery ¶ added in v0.9.1
type PrevEntryQuery interface { Query Request() *indexedmap.PrevEntryRequest }
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 { Put() PutProposals Remove() RemoveProposals Clear() ClearProposals Events() EventsProposals }
type PutProposal ¶
type PutProposal interface { Proposal Request() *indexedmap.PutRequest }
type PutProposals ¶
type PutProposals interface { Get(ProposalID) (PutProposal, bool) List() []PutProposal }
type RemoveProposal ¶
type RemoveProposal interface { Proposal Request() *indexedmap.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 returns the size of the map Size(SizeQuery) (*indexedmap.SizeResponse, error) // Put puts an entry into the map Put(PutProposal) (*indexedmap.PutResponse, error) // Get gets the entry for a key Get(GetQuery) (*indexedmap.GetResponse, error) // FirstEntry gets the first entry in the map FirstEntry(FirstEntryQuery) (*indexedmap.FirstEntryResponse, error) // LastEntry gets the last entry in the map LastEntry(LastEntryQuery) (*indexedmap.LastEntryResponse, error) // PrevEntry gets the previous entry in the map PrevEntry(PrevEntryQuery) (*indexedmap.PrevEntryResponse, error) // NextEntry gets the next entry in the map NextEntry(NextEntryQuery) (*indexedmap.NextEntryResponse, error) // Remove removes an entry from the map Remove(RemoveProposal) (*indexedmap.RemoveResponse, error) // Clear removes all entries from the map Clear(ClearProposal) (*indexedmap.ClearResponse, error) // Events listens for change events Events(EventsProposal) // Entries lists all entries in the map Entries(EntriesQuery) }
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 SizeQuery ¶ added in v0.9.1
type SizeQuery interface { Query Request() *indexedmap.SizeRequest }
type SnapshotReader ¶
type SnapshotReader interface {
ReadState() (*IndexedMapState, error)
}
type SnapshotWriter ¶
type SnapshotWriter interface {
WriteState(*IndexedMapState) error
}
Click to show internal directories.
Click to hide internal directories.