Documentation
¶
Overview ¶
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Code generated by atomix-go-framework. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func RegisterServer(node *gossip.Node)
- func RegisterService(node *gossip.Node)
- type CounterState
- func (*CounterState) Descriptor() ([]byte, []int)
- func (m *CounterState) GetDecrements() map[string]int64
- func (m *CounterState) GetIncrements() map[string]int64
- func (m *CounterState) Marshal() (dAtA []byte, err error)
- func (m *CounterState) MarshalTo(dAtA []byte) (int, error)
- func (m *CounterState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CounterState) ProtoMessage()
- func (m *CounterState) Reset()
- func (m *CounterState) Size() (n int)
- func (m *CounterState) String() string
- func (m *CounterState) Unmarshal(dAtA []byte) error
- func (m *CounterState) XXX_DiscardUnknown()
- func (m *CounterState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CounterState) XXX_Merge(src proto.Message)
- func (m *CounterState) XXX_Size() int
- func (m *CounterState) XXX_Unmarshal(b []byte) error
- type GossipClient
- type GossipEngine
- type GossipGroup
- type GossipHandler
- type GossipMember
- type GossipMemberID
- type GossipProtocol
- type GossipServer
- type Server
- func (s *Server) Decrement(ctx context.Context, request *counter.DecrementRequest) (*counter.DecrementResponse, error)
- func (s *Server) Get(ctx context.Context, request *counter.GetRequest) (*counter.GetResponse, error)
- func (s *Server) Increment(ctx context.Context, request *counter.IncrementRequest) (*counter.IncrementResponse, error)
- func (s *Server) Set(ctx context.Context, request *counter.SetRequest) (*counter.SetResponse, error)
- type Service
Constants ¶
View Source
const ServiceType gossip.ServiceType = "Counter"
Variables ¶
Functions ¶
func RegisterServer ¶
RegisterServer registers the primitive on the given node
func RegisterService ¶
RegisterService registers the service on the given node
Types ¶
type CounterState ¶
type CounterState struct {
meta.ObjectMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"`
Increments map[string]int64 `` /* 162-byte string literal not displayed */
Decrements map[string]int64 `` /* 162-byte string literal not displayed */
}
func (*CounterState) Descriptor ¶
func (*CounterState) Descriptor() ([]byte, []int)
func (*CounterState) GetDecrements ¶
func (m *CounterState) GetDecrements() map[string]int64
func (*CounterState) GetIncrements ¶
func (m *CounterState) GetIncrements() map[string]int64
func (*CounterState) Marshal ¶
func (m *CounterState) Marshal() (dAtA []byte, err error)
func (*CounterState) MarshalToSizedBuffer ¶
func (m *CounterState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CounterState) ProtoMessage ¶
func (*CounterState) ProtoMessage()
func (*CounterState) Reset ¶
func (m *CounterState) Reset()
func (*CounterState) Size ¶
func (m *CounterState) Size() (n int)
func (*CounterState) String ¶
func (m *CounterState) String() string
func (*CounterState) Unmarshal ¶
func (m *CounterState) Unmarshal(dAtA []byte) error
func (*CounterState) XXX_DiscardUnknown ¶
func (m *CounterState) XXX_DiscardUnknown()
func (*CounterState) XXX_Marshal ¶
func (m *CounterState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CounterState) XXX_Merge ¶
func (m *CounterState) XXX_Merge(src proto.Message)
func (*CounterState) XXX_Size ¶
func (m *CounterState) XXX_Size() int
func (*CounterState) XXX_Unmarshal ¶
func (m *CounterState) XXX_Unmarshal(b []byte) error
type GossipClient ¶
type GossipClient interface {
Bootstrap(ctx context.Context) (*CounterState, error)
Repair(ctx context.Context, state *CounterState) (*CounterState, error)
Advertise(ctx context.Context, state *CounterState) error
Update(ctx context.Context, state *CounterState) error
}
type GossipEngine ¶
type GossipEngine interface {
// contains filtered or unexported methods
}
type GossipGroup ¶
type GossipGroup interface {
GossipClient
MemberID() GossipMemberID
Members() []GossipMember
Member(GossipMemberID) GossipMember
}
type GossipHandler ¶
type GossipHandler interface {
Read(ctx context.Context) (*CounterState, error)
Update(ctx context.Context, state *CounterState) error
}
type GossipMember ¶
type GossipMember interface {
GossipClient
ID() GossipMemberID
Client() *gossip.Peer
}
type GossipMemberID ¶
func (GossipMemberID) String ¶
func (i GossipMemberID) String() string
type GossipProtocol ¶
type GossipProtocol interface {
Clock() atime.Clock
Group() GossipGroup
Server() GossipServer
}
type GossipServer ¶
type GossipServer interface {
Register(GossipHandler) error
// contains filtered or unexported methods
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Decrement ¶
func (s *Server) Decrement(ctx context.Context, request *counter.DecrementRequest) (*counter.DecrementResponse, error)
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *counter.GetRequest) (*counter.GetResponse, error)
func (*Server) Increment ¶
func (s *Server) Increment(ctx context.Context, request *counter.IncrementRequest) (*counter.IncrementResponse, error)
func (*Server) Set ¶
func (s *Server) Set(ctx context.Context, request *counter.SetRequest) (*counter.SetResponse, error)
type Service ¶
type Service interface {
gossip.Service
// Set sets the counter value
Set(context.Context, *counter.SetRequest) (*counter.SetResponse, error)
// Get gets the current counter value
Get(context.Context, *counter.GetRequest) (*counter.GetResponse, error)
// Increment increments the counter value
Increment(context.Context, *counter.IncrementRequest) (*counter.IncrementResponse, error)
// Decrement decrements the counter value
Decrement(context.Context, *counter.DecrementRequest) (*counter.DecrementResponse, error)
}
Click to show internal directories.
Click to hide internal directories.