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 GetQuery
- type MapState
- func (*MapState) Descriptor() ([]byte, []int)
- func (m *MapState) GetEntries() []MapStateEntry
- func (m *MapState) GetListeners() []MapStateListener
- func (m *MapState) Marshal() (dAtA []byte, err error)
- func (m *MapState) MarshalTo(dAtA []byte) (int, error)
- func (m *MapState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapState) ProtoMessage()
- func (m *MapState) Reset()
- func (m *MapState) Size() (n int)
- func (m *MapState) String() string
- func (m *MapState) Unmarshal(dAtA []byte) error
- func (m *MapState) XXX_DiscardUnknown()
- func (m *MapState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapState) XXX_Merge(src proto.Message)
- func (m *MapState) XXX_Size() int
- func (m *MapState) XXX_Unmarshal(b []byte) error
- type MapStateEntry
- func (*MapStateEntry) Descriptor() ([]byte, []int)
- func (m *MapStateEntry) GetKey() MapStateKey
- func (m *MapStateEntry) GetValue() *MapStateValue
- func (m *MapStateEntry) Marshal() (dAtA []byte, err error)
- func (m *MapStateEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateEntry) ProtoMessage()
- func (m *MapStateEntry) Reset()
- func (m *MapStateEntry) Size() (n int)
- func (m *MapStateEntry) String() string
- func (m *MapStateEntry) Unmarshal(dAtA []byte) error
- func (m *MapStateEntry) XXX_DiscardUnknown()
- func (m *MapStateEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateEntry) XXX_Merge(src proto.Message)
- func (m *MapStateEntry) XXX_Size() int
- func (m *MapStateEntry) XXX_Unmarshal(b []byte) error
- type MapStateKey
- func (*MapStateKey) Descriptor() ([]byte, []int)
- func (m *MapStateKey) GetKey() string
- func (m *MapStateKey) Marshal() (dAtA []byte, err error)
- func (m *MapStateKey) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateKey) ProtoMessage()
- func (m *MapStateKey) Reset()
- func (m *MapStateKey) Size() (n int)
- func (m *MapStateKey) String() string
- func (m *MapStateKey) Unmarshal(dAtA []byte) error
- func (m *MapStateKey) XXX_DiscardUnknown()
- func (m *MapStateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateKey) XXX_Merge(src proto.Message)
- func (m *MapStateKey) XXX_Size() int
- func (m *MapStateKey) XXX_Unmarshal(b []byte) error
- type MapStateListener
- func (*MapStateListener) Descriptor() ([]byte, []int)
- func (m *MapStateListener) GetKey() string
- func (m *MapStateListener) GetProposalID() ProposalID
- func (m *MapStateListener) Marshal() (dAtA []byte, err error)
- func (m *MapStateListener) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateListener) ProtoMessage()
- func (m *MapStateListener) Reset()
- func (m *MapStateListener) Size() (n int)
- func (m *MapStateListener) String() string
- func (m *MapStateListener) Unmarshal(dAtA []byte) error
- func (m *MapStateListener) XXX_DiscardUnknown()
- func (m *MapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateListener) XXX_Merge(src proto.Message)
- func (m *MapStateListener) XXX_Size() int
- func (m *MapStateListener) XXX_Unmarshal(b []byte) error
- type MapStateValue
- func (*MapStateValue) Descriptor() ([]byte, []int)
- func (m *MapStateValue) GetExpire() *time.Time
- func (m *MapStateValue) GetValue() []byte
- func (m *MapStateValue) Marshal() (dAtA []byte, err error)
- func (m *MapStateValue) MarshalTo(dAtA []byte) (int, error)
- func (m *MapStateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MapStateValue) ProtoMessage()
- func (m *MapStateValue) Reset()
- func (m *MapStateValue) Size() (n int)
- func (m *MapStateValue) String() string
- func (m *MapStateValue) Unmarshal(dAtA []byte) error
- func (m *MapStateValue) XXX_DiscardUnknown()
- func (m *MapStateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapStateValue) XXX_Merge(src proto.Message)
- func (m *MapStateValue) XXX_Size() int
- func (m *MapStateValue) XXX_Unmarshal(b []byte) error
- type NewServiceFunc
- 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 = "Map"
Variables ¶
Functions ¶
func RegisterService ¶
RegisterService registers the election primitive service on the given node
Types ¶
type ClearProposal ¶
type ClearProposal interface { Proposal Request() *_map.ClearRequest }
type ClearProposals ¶
type ClearProposals interface { Get(ProposalID) (ClearProposal, bool) List() []ClearProposal }
type EntriesQuery ¶ added in v0.9.1
type EntriesQuery interface { Query Request() *_map.EntriesRequest Notify(*_map.EntriesResponse) Close() }
type EventsProposal ¶
type EventsProposal interface { Proposal Request() *_map.EventsRequest Notify(*_map.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() *_map.GetRequest }
type MapState ¶
type MapState struct { Listeners []MapStateListener `protobuf:"bytes,1,rep,name=listeners,proto3" json:"listeners"` Entries []MapStateEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` }
func (*MapState) Descriptor ¶
func (*MapState) GetEntries ¶
func (m *MapState) GetEntries() []MapStateEntry
func (*MapState) GetListeners ¶
func (m *MapState) GetListeners() []MapStateListener
func (*MapState) MarshalToSizedBuffer ¶
func (*MapState) ProtoMessage ¶
func (*MapState) ProtoMessage()
func (*MapState) XXX_DiscardUnknown ¶
func (m *MapState) XXX_DiscardUnknown()
func (*MapState) XXX_Marshal ¶
func (*MapState) XXX_Unmarshal ¶
type MapStateEntry ¶
type MapStateEntry struct { Key MapStateKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key"` Value *MapStateValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*MapStateEntry) Descriptor ¶
func (*MapStateEntry) Descriptor() ([]byte, []int)
func (*MapStateEntry) GetKey ¶
func (m *MapStateEntry) GetKey() MapStateKey
func (*MapStateEntry) GetValue ¶
func (m *MapStateEntry) GetValue() *MapStateValue
func (*MapStateEntry) Marshal ¶
func (m *MapStateEntry) Marshal() (dAtA []byte, err error)
func (*MapStateEntry) MarshalToSizedBuffer ¶
func (m *MapStateEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateEntry) ProtoMessage ¶
func (*MapStateEntry) ProtoMessage()
func (*MapStateEntry) Reset ¶
func (m *MapStateEntry) Reset()
func (*MapStateEntry) Size ¶
func (m *MapStateEntry) Size() (n int)
func (*MapStateEntry) String ¶
func (m *MapStateEntry) String() string
func (*MapStateEntry) Unmarshal ¶
func (m *MapStateEntry) Unmarshal(dAtA []byte) error
func (*MapStateEntry) XXX_DiscardUnknown ¶
func (m *MapStateEntry) XXX_DiscardUnknown()
func (*MapStateEntry) XXX_Marshal ¶
func (m *MapStateEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateEntry) XXX_Merge ¶
func (m *MapStateEntry) XXX_Merge(src proto.Message)
func (*MapStateEntry) XXX_Size ¶
func (m *MapStateEntry) XXX_Size() int
func (*MapStateEntry) XXX_Unmarshal ¶
func (m *MapStateEntry) XXX_Unmarshal(b []byte) error
type MapStateKey ¶
type MapStateKey struct { meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` }
func (*MapStateKey) Descriptor ¶
func (*MapStateKey) Descriptor() ([]byte, []int)
func (*MapStateKey) GetKey ¶
func (m *MapStateKey) GetKey() string
func (*MapStateKey) Marshal ¶
func (m *MapStateKey) Marshal() (dAtA []byte, err error)
func (*MapStateKey) MarshalToSizedBuffer ¶
func (m *MapStateKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateKey) ProtoMessage ¶
func (*MapStateKey) ProtoMessage()
func (*MapStateKey) Reset ¶
func (m *MapStateKey) Reset()
func (*MapStateKey) Size ¶
func (m *MapStateKey) Size() (n int)
func (*MapStateKey) String ¶
func (m *MapStateKey) String() string
func (*MapStateKey) Unmarshal ¶
func (m *MapStateKey) Unmarshal(dAtA []byte) error
func (*MapStateKey) XXX_DiscardUnknown ¶
func (m *MapStateKey) XXX_DiscardUnknown()
func (*MapStateKey) XXX_Marshal ¶
func (m *MapStateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateKey) XXX_Merge ¶
func (m *MapStateKey) XXX_Merge(src proto.Message)
func (*MapStateKey) XXX_Size ¶
func (m *MapStateKey) XXX_Size() int
func (*MapStateKey) XXX_Unmarshal ¶
func (m *MapStateKey) XXX_Unmarshal(b []byte) error
type MapStateListener ¶
type MapStateListener 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"` }
func (*MapStateListener) Descriptor ¶
func (*MapStateListener) Descriptor() ([]byte, []int)
func (*MapStateListener) GetKey ¶
func (m *MapStateListener) GetKey() string
func (*MapStateListener) GetProposalID ¶
func (m *MapStateListener) GetProposalID() ProposalID
func (*MapStateListener) Marshal ¶
func (m *MapStateListener) Marshal() (dAtA []byte, err error)
func (*MapStateListener) MarshalToSizedBuffer ¶
func (m *MapStateListener) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateListener) ProtoMessage ¶
func (*MapStateListener) ProtoMessage()
func (*MapStateListener) Reset ¶
func (m *MapStateListener) Reset()
func (*MapStateListener) Size ¶
func (m *MapStateListener) Size() (n int)
func (*MapStateListener) String ¶
func (m *MapStateListener) String() string
func (*MapStateListener) Unmarshal ¶
func (m *MapStateListener) Unmarshal(dAtA []byte) error
func (*MapStateListener) XXX_DiscardUnknown ¶
func (m *MapStateListener) XXX_DiscardUnknown()
func (*MapStateListener) XXX_Marshal ¶
func (m *MapStateListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateListener) XXX_Merge ¶
func (m *MapStateListener) XXX_Merge(src proto.Message)
func (*MapStateListener) XXX_Size ¶
func (m *MapStateListener) XXX_Size() int
func (*MapStateListener) XXX_Unmarshal ¶
func (m *MapStateListener) XXX_Unmarshal(b []byte) error
type MapStateValue ¶
type MapStateValue struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Expire *time.Time `protobuf:"bytes,2,opt,name=expire,proto3,stdtime" json:"expire,omitempty"` }
func (*MapStateValue) Descriptor ¶
func (*MapStateValue) Descriptor() ([]byte, []int)
func (*MapStateValue) GetExpire ¶
func (m *MapStateValue) GetExpire() *time.Time
func (*MapStateValue) GetValue ¶
func (m *MapStateValue) GetValue() []byte
func (*MapStateValue) Marshal ¶
func (m *MapStateValue) Marshal() (dAtA []byte, err error)
func (*MapStateValue) MarshalToSizedBuffer ¶
func (m *MapStateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MapStateValue) ProtoMessage ¶
func (*MapStateValue) ProtoMessage()
func (*MapStateValue) Reset ¶
func (m *MapStateValue) Reset()
func (*MapStateValue) Size ¶
func (m *MapStateValue) Size() (n int)
func (*MapStateValue) String ¶
func (m *MapStateValue) String() string
func (*MapStateValue) Unmarshal ¶
func (m *MapStateValue) Unmarshal(dAtA []byte) error
func (*MapStateValue) XXX_DiscardUnknown ¶
func (m *MapStateValue) XXX_DiscardUnknown()
func (*MapStateValue) XXX_Marshal ¶
func (m *MapStateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MapStateValue) XXX_Merge ¶
func (m *MapStateValue) XXX_Merge(src proto.Message)
func (*MapStateValue) XXX_Size ¶
func (m *MapStateValue) XXX_Size() int
func (*MapStateValue) XXX_Unmarshal ¶
func (m *MapStateValue) XXX_Unmarshal(b []byte) error
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 { Put() PutProposals Remove() RemoveProposals Clear() ClearProposals Events() EventsProposals }
type PutProposal ¶
type PutProposal interface { Proposal Request() *_map.PutRequest }
type PutProposals ¶
type PutProposals interface { Get(ProposalID) (PutProposal, bool) List() []PutProposal }
type RemoveProposal ¶
type RemoveProposal interface { Proposal Request() *_map.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) (*_map.SizeResponse, error) // Put puts an entry into the map Put(PutProposal) (*_map.PutResponse, error) // Get gets the entry for a key Get(GetQuery) (*_map.GetResponse, error) // Remove removes an entry from the map Remove(RemoveProposal) (*_map.RemoveResponse, error) // Clear removes all entries from the map Clear(ClearProposal) (*_map.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() *_map.SizeRequest }
type SnapshotReader ¶
type SnapshotWriter ¶
Click to show internal directories.
Click to hide internal directories.