Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPrimitive(node *atomix.Node)
- type CheckAndSetRequest
- func (*CheckAndSetRequest) Descriptor() ([]byte, []int)
- func (m *CheckAndSetRequest) GetExpect() int64
- func (m *CheckAndSetRequest) GetUpdate() int64
- func (m *CheckAndSetRequest) Marshal() (dAtA []byte, err error)
- func (m *CheckAndSetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CheckAndSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CheckAndSetRequest) ProtoMessage()
- func (m *CheckAndSetRequest) Reset()
- func (m *CheckAndSetRequest) Size() (n int)
- func (m *CheckAndSetRequest) String() string
- func (m *CheckAndSetRequest) Unmarshal(dAtA []byte) error
- func (m *CheckAndSetRequest) XXX_DiscardUnknown()
- func (m *CheckAndSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CheckAndSetRequest) XXX_Merge(src proto.Message)
- func (m *CheckAndSetRequest) XXX_Size() int
- func (m *CheckAndSetRequest) XXX_Unmarshal(b []byte) error
- type CheckAndSetResponse
- func (*CheckAndSetResponse) Descriptor() ([]byte, []int)
- func (m *CheckAndSetResponse) GetSucceeded() bool
- func (m *CheckAndSetResponse) Marshal() (dAtA []byte, err error)
- func (m *CheckAndSetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CheckAndSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CheckAndSetResponse) ProtoMessage()
- func (m *CheckAndSetResponse) Reset()
- func (m *CheckAndSetResponse) Size() (n int)
- func (m *CheckAndSetResponse) String() string
- func (m *CheckAndSetResponse) Unmarshal(dAtA []byte) error
- func (m *CheckAndSetResponse) XXX_DiscardUnknown()
- func (m *CheckAndSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CheckAndSetResponse) XXX_Merge(src proto.Message)
- func (m *CheckAndSetResponse) XXX_Size() int
- func (m *CheckAndSetResponse) XXX_Unmarshal(b []byte) error
- type CounterSnapshot
- func (*CounterSnapshot) Descriptor() ([]byte, []int)
- func (m *CounterSnapshot) GetValue() int64
- func (m *CounterSnapshot) Marshal() (dAtA []byte, err error)
- func (m *CounterSnapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *CounterSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CounterSnapshot) ProtoMessage()
- func (m *CounterSnapshot) Reset()
- func (m *CounterSnapshot) Size() (n int)
- func (m *CounterSnapshot) String() string
- func (m *CounterSnapshot) Unmarshal(dAtA []byte) error
- func (m *CounterSnapshot) XXX_DiscardUnknown()
- func (m *CounterSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CounterSnapshot) XXX_Merge(src proto.Message)
- func (m *CounterSnapshot) XXX_Size() int
- func (m *CounterSnapshot) XXX_Unmarshal(b []byte) error
- type DecrementRequest
- func (*DecrementRequest) Descriptor() ([]byte, []int)
- func (m *DecrementRequest) GetDelta() int64
- func (m *DecrementRequest) Marshal() (dAtA []byte, err error)
- func (m *DecrementRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *DecrementRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DecrementRequest) ProtoMessage()
- func (m *DecrementRequest) Reset()
- func (m *DecrementRequest) Size() (n int)
- func (m *DecrementRequest) String() string
- func (m *DecrementRequest) Unmarshal(dAtA []byte) error
- func (m *DecrementRequest) XXX_DiscardUnknown()
- func (m *DecrementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DecrementRequest) XXX_Merge(src proto.Message)
- func (m *DecrementRequest) XXX_Size() int
- func (m *DecrementRequest) XXX_Unmarshal(b []byte) error
- type DecrementResponse
- func (*DecrementResponse) Descriptor() ([]byte, []int)
- func (m *DecrementResponse) GetNextValue() int64
- func (m *DecrementResponse) GetPreviousValue() int64
- func (m *DecrementResponse) Marshal() (dAtA []byte, err error)
- func (m *DecrementResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *DecrementResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DecrementResponse) ProtoMessage()
- func (m *DecrementResponse) Reset()
- func (m *DecrementResponse) Size() (n int)
- func (m *DecrementResponse) String() string
- func (m *DecrementResponse) Unmarshal(dAtA []byte) error
- func (m *DecrementResponse) XXX_DiscardUnknown()
- func (m *DecrementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DecrementResponse) XXX_Merge(src proto.Message)
- func (m *DecrementResponse) XXX_Size() int
- func (m *DecrementResponse) XXX_Unmarshal(b []byte) error
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) Marshal() (dAtA []byte, err error)
- func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) Size() (n int)
- func (m *GetRequest) String() string
- func (m *GetRequest) Unmarshal(dAtA []byte) error
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)
- func (m *GetResponse) GetValue() int64
- func (m *GetResponse) Marshal() (dAtA []byte, err error)
- func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetResponse) ProtoMessage()
- func (m *GetResponse) Reset()
- func (m *GetResponse) Size() (n int)
- func (m *GetResponse) String() string
- func (m *GetResponse) Unmarshal(dAtA []byte) error
- func (m *GetResponse) XXX_DiscardUnknown()
- func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetResponse) XXX_Merge(src proto.Message)
- func (m *GetResponse) XXX_Size() int
- func (m *GetResponse) XXX_Unmarshal(b []byte) error
- type IncrementRequest
- func (*IncrementRequest) Descriptor() ([]byte, []int)
- func (m *IncrementRequest) GetDelta() int64
- func (m *IncrementRequest) Marshal() (dAtA []byte, err error)
- func (m *IncrementRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *IncrementRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IncrementRequest) ProtoMessage()
- func (m *IncrementRequest) Reset()
- func (m *IncrementRequest) Size() (n int)
- func (m *IncrementRequest) String() string
- func (m *IncrementRequest) Unmarshal(dAtA []byte) error
- func (m *IncrementRequest) XXX_DiscardUnknown()
- func (m *IncrementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IncrementRequest) XXX_Merge(src proto.Message)
- func (m *IncrementRequest) XXX_Size() int
- func (m *IncrementRequest) XXX_Unmarshal(b []byte) error
- type IncrementResponse
- func (*IncrementResponse) Descriptor() ([]byte, []int)
- func (m *IncrementResponse) GetNextValue() int64
- func (m *IncrementResponse) GetPreviousValue() int64
- func (m *IncrementResponse) Marshal() (dAtA []byte, err error)
- func (m *IncrementResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *IncrementResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IncrementResponse) ProtoMessage()
- func (m *IncrementResponse) Reset()
- func (m *IncrementResponse) Size() (n int)
- func (m *IncrementResponse) String() string
- func (m *IncrementResponse) Unmarshal(dAtA []byte) error
- func (m *IncrementResponse) XXX_DiscardUnknown()
- func (m *IncrementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IncrementResponse) XXX_Merge(src proto.Message)
- func (m *IncrementResponse) XXX_Size() int
- func (m *IncrementResponse) XXX_Unmarshal(b []byte) error
- type Primitive
- type Server
- func (s *Server) CheckAndSet(ctx context.Context, request *api.CheckAndSetRequest) (*api.CheckAndSetResponse, error)
- func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)
- func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)
- func (s *Server) Decrement(ctx context.Context, request *api.DecrementRequest) (*api.DecrementResponse, error)
- func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)
- func (s *Server) Increment(ctx context.Context, request *api.IncrementRequest) (*api.IncrementResponse, error)
- func (s *Server) Set(ctx context.Context, request *api.SetRequest) (*api.SetResponse, error)
- type Service
- func (c *Service) Backup(writer io.Writer) error
- func (c *Service) CAS(bytes []byte) ([]byte, error)
- func (c *Service) Decrement(bytes []byte) ([]byte, error)
- func (c *Service) Get(bytes []byte) ([]byte, error)
- func (c *Service) Increment(bytes []byte) ([]byte, error)
- func (c *Service) Restore(reader io.Reader) error
- func (c *Service) Set(bytes []byte) ([]byte, error)
- type SetRequest
- func (*SetRequest) Descriptor() ([]byte, []int)
- func (m *SetRequest) GetValue() int64
- func (m *SetRequest) Marshal() (dAtA []byte, err error)
- func (m *SetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *SetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SetRequest) ProtoMessage()
- func (m *SetRequest) Reset()
- func (m *SetRequest) Size() (n int)
- func (m *SetRequest) String() string
- func (m *SetRequest) Unmarshal(dAtA []byte) error
- func (m *SetRequest) XXX_DiscardUnknown()
- func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetRequest) XXX_Merge(src proto.Message)
- func (m *SetRequest) XXX_Size() int
- func (m *SetRequest) XXX_Unmarshal(b []byte) error
- type SetResponse
- func (*SetResponse) Descriptor() ([]byte, []int)
- func (m *SetResponse) GetPreviousValue() int64
- func (m *SetResponse) Marshal() (dAtA []byte, err error)
- func (m *SetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *SetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SetResponse) ProtoMessage()
- func (m *SetResponse) Reset()
- func (m *SetResponse) Size() (n int)
- func (m *SetResponse) String() string
- func (m *SetResponse) Unmarshal(dAtA []byte) error
- func (m *SetResponse) XXX_DiscardUnknown()
- func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetResponse) XXX_Merge(src proto.Message)
- func (m *SetResponse) XXX_Size() int
- func (m *SetResponse) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const Type = primitiveapi.PrimitiveType_COUNTER
Type is the counter primitive type
Variables ¶
Functions ¶
func RegisterPrimitive ¶
RegisterPrimitive registers the primitive on the given node
Types ¶
type CheckAndSetRequest ¶
type CheckAndSetRequest struct { Expect int64 `protobuf:"varint,1,opt,name=expect,proto3" json:"expect,omitempty"` Update int64 `protobuf:"varint,2,opt,name=update,proto3" json:"update,omitempty"` }
func (*CheckAndSetRequest) Descriptor ¶
func (*CheckAndSetRequest) Descriptor() ([]byte, []int)
func (*CheckAndSetRequest) GetExpect ¶
func (m *CheckAndSetRequest) GetExpect() int64
func (*CheckAndSetRequest) GetUpdate ¶
func (m *CheckAndSetRequest) GetUpdate() int64
func (*CheckAndSetRequest) Marshal ¶
func (m *CheckAndSetRequest) Marshal() (dAtA []byte, err error)
func (*CheckAndSetRequest) MarshalTo ¶
func (m *CheckAndSetRequest) MarshalTo(dAtA []byte) (int, error)
func (*CheckAndSetRequest) MarshalToSizedBuffer ¶
func (m *CheckAndSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CheckAndSetRequest) ProtoMessage ¶
func (*CheckAndSetRequest) ProtoMessage()
func (*CheckAndSetRequest) Reset ¶
func (m *CheckAndSetRequest) Reset()
func (*CheckAndSetRequest) Size ¶
func (m *CheckAndSetRequest) Size() (n int)
func (*CheckAndSetRequest) String ¶
func (m *CheckAndSetRequest) String() string
func (*CheckAndSetRequest) Unmarshal ¶
func (m *CheckAndSetRequest) Unmarshal(dAtA []byte) error
func (*CheckAndSetRequest) XXX_DiscardUnknown ¶
func (m *CheckAndSetRequest) XXX_DiscardUnknown()
func (*CheckAndSetRequest) XXX_Marshal ¶
func (m *CheckAndSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CheckAndSetRequest) XXX_Merge ¶
func (m *CheckAndSetRequest) XXX_Merge(src proto.Message)
func (*CheckAndSetRequest) XXX_Size ¶
func (m *CheckAndSetRequest) XXX_Size() int
func (*CheckAndSetRequest) XXX_Unmarshal ¶
func (m *CheckAndSetRequest) XXX_Unmarshal(b []byte) error
type CheckAndSetResponse ¶
type CheckAndSetResponse struct {
Succeeded bool `protobuf:"varint,1,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
}
func (*CheckAndSetResponse) Descriptor ¶
func (*CheckAndSetResponse) Descriptor() ([]byte, []int)
func (*CheckAndSetResponse) GetSucceeded ¶
func (m *CheckAndSetResponse) GetSucceeded() bool
func (*CheckAndSetResponse) Marshal ¶
func (m *CheckAndSetResponse) Marshal() (dAtA []byte, err error)
func (*CheckAndSetResponse) MarshalTo ¶
func (m *CheckAndSetResponse) MarshalTo(dAtA []byte) (int, error)
func (*CheckAndSetResponse) MarshalToSizedBuffer ¶
func (m *CheckAndSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CheckAndSetResponse) ProtoMessage ¶
func (*CheckAndSetResponse) ProtoMessage()
func (*CheckAndSetResponse) Reset ¶
func (m *CheckAndSetResponse) Reset()
func (*CheckAndSetResponse) Size ¶
func (m *CheckAndSetResponse) Size() (n int)
func (*CheckAndSetResponse) String ¶
func (m *CheckAndSetResponse) String() string
func (*CheckAndSetResponse) Unmarshal ¶
func (m *CheckAndSetResponse) Unmarshal(dAtA []byte) error
func (*CheckAndSetResponse) XXX_DiscardUnknown ¶
func (m *CheckAndSetResponse) XXX_DiscardUnknown()
func (*CheckAndSetResponse) XXX_Marshal ¶
func (m *CheckAndSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CheckAndSetResponse) XXX_Merge ¶
func (m *CheckAndSetResponse) XXX_Merge(src proto.Message)
func (*CheckAndSetResponse) XXX_Size ¶
func (m *CheckAndSetResponse) XXX_Size() int
func (*CheckAndSetResponse) XXX_Unmarshal ¶
func (m *CheckAndSetResponse) XXX_Unmarshal(b []byte) error
type CounterSnapshot ¶
type CounterSnapshot struct {
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
Counter snapshot
func (*CounterSnapshot) Descriptor ¶
func (*CounterSnapshot) Descriptor() ([]byte, []int)
func (*CounterSnapshot) GetValue ¶
func (m *CounterSnapshot) GetValue() int64
func (*CounterSnapshot) Marshal ¶
func (m *CounterSnapshot) Marshal() (dAtA []byte, err error)
func (*CounterSnapshot) MarshalToSizedBuffer ¶
func (m *CounterSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CounterSnapshot) ProtoMessage ¶
func (*CounterSnapshot) ProtoMessage()
func (*CounterSnapshot) Reset ¶
func (m *CounterSnapshot) Reset()
func (*CounterSnapshot) Size ¶
func (m *CounterSnapshot) Size() (n int)
func (*CounterSnapshot) String ¶
func (m *CounterSnapshot) String() string
func (*CounterSnapshot) Unmarshal ¶
func (m *CounterSnapshot) Unmarshal(dAtA []byte) error
func (*CounterSnapshot) XXX_DiscardUnknown ¶
func (m *CounterSnapshot) XXX_DiscardUnknown()
func (*CounterSnapshot) XXX_Marshal ¶
func (m *CounterSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CounterSnapshot) XXX_Merge ¶
func (m *CounterSnapshot) XXX_Merge(src proto.Message)
func (*CounterSnapshot) XXX_Size ¶
func (m *CounterSnapshot) XXX_Size() int
func (*CounterSnapshot) XXX_Unmarshal ¶
func (m *CounterSnapshot) XXX_Unmarshal(b []byte) error
type DecrementRequest ¶
type DecrementRequest struct {
Delta int64 `protobuf:"varint,1,opt,name=delta,proto3" json:"delta,omitempty"`
}
func (*DecrementRequest) Descriptor ¶
func (*DecrementRequest) Descriptor() ([]byte, []int)
func (*DecrementRequest) GetDelta ¶
func (m *DecrementRequest) GetDelta() int64
func (*DecrementRequest) Marshal ¶
func (m *DecrementRequest) Marshal() (dAtA []byte, err error)
func (*DecrementRequest) MarshalToSizedBuffer ¶
func (m *DecrementRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DecrementRequest) ProtoMessage ¶
func (*DecrementRequest) ProtoMessage()
func (*DecrementRequest) Reset ¶
func (m *DecrementRequest) Reset()
func (*DecrementRequest) Size ¶
func (m *DecrementRequest) Size() (n int)
func (*DecrementRequest) String ¶
func (m *DecrementRequest) String() string
func (*DecrementRequest) Unmarshal ¶
func (m *DecrementRequest) Unmarshal(dAtA []byte) error
func (*DecrementRequest) XXX_DiscardUnknown ¶
func (m *DecrementRequest) XXX_DiscardUnknown()
func (*DecrementRequest) XXX_Marshal ¶
func (m *DecrementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DecrementRequest) XXX_Merge ¶
func (m *DecrementRequest) XXX_Merge(src proto.Message)
func (*DecrementRequest) XXX_Size ¶
func (m *DecrementRequest) XXX_Size() int
func (*DecrementRequest) XXX_Unmarshal ¶
func (m *DecrementRequest) XXX_Unmarshal(b []byte) error
type DecrementResponse ¶
type DecrementResponse struct { PreviousValue int64 `protobuf:"varint,1,opt,name=previous_value,json=previousValue,proto3" json:"previous_value,omitempty"` NextValue int64 `protobuf:"varint,2,opt,name=next_value,json=nextValue,proto3" json:"next_value,omitempty"` }
func (*DecrementResponse) Descriptor ¶
func (*DecrementResponse) Descriptor() ([]byte, []int)
func (*DecrementResponse) GetNextValue ¶
func (m *DecrementResponse) GetNextValue() int64
func (*DecrementResponse) GetPreviousValue ¶
func (m *DecrementResponse) GetPreviousValue() int64
func (*DecrementResponse) Marshal ¶
func (m *DecrementResponse) Marshal() (dAtA []byte, err error)
func (*DecrementResponse) MarshalTo ¶
func (m *DecrementResponse) MarshalTo(dAtA []byte) (int, error)
func (*DecrementResponse) MarshalToSizedBuffer ¶
func (m *DecrementResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DecrementResponse) ProtoMessage ¶
func (*DecrementResponse) ProtoMessage()
func (*DecrementResponse) Reset ¶
func (m *DecrementResponse) Reset()
func (*DecrementResponse) Size ¶
func (m *DecrementResponse) Size() (n int)
func (*DecrementResponse) String ¶
func (m *DecrementResponse) String() string
func (*DecrementResponse) Unmarshal ¶
func (m *DecrementResponse) Unmarshal(dAtA []byte) error
func (*DecrementResponse) XXX_DiscardUnknown ¶
func (m *DecrementResponse) XXX_DiscardUnknown()
func (*DecrementResponse) XXX_Marshal ¶
func (m *DecrementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DecrementResponse) XXX_Merge ¶
func (m *DecrementResponse) XXX_Merge(src proto.Message)
func (*DecrementResponse) XXX_Size ¶
func (m *DecrementResponse) XXX_Size() int
func (*DecrementResponse) XXX_Unmarshal ¶
func (m *DecrementResponse) XXX_Unmarshal(b []byte) error
type GetRequest ¶
type GetRequest struct { }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) Marshal ¶
func (m *GetRequest) Marshal() (dAtA []byte, err error)
func (*GetRequest) MarshalToSizedBuffer ¶
func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) Size ¶
func (m *GetRequest) Size() (n int)
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) Unmarshal ¶
func (m *GetRequest) Unmarshal(dAtA []byte) error
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type GetResponse ¶
type GetResponse struct {
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetValue ¶
func (m *GetResponse) GetValue() int64
func (*GetResponse) Marshal ¶
func (m *GetResponse) Marshal() (dAtA []byte, err error)
func (*GetResponse) MarshalToSizedBuffer ¶
func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) Size ¶
func (m *GetResponse) Size() (n int)
func (*GetResponse) String ¶
func (m *GetResponse) String() string
func (*GetResponse) Unmarshal ¶
func (m *GetResponse) Unmarshal(dAtA []byte) error
func (*GetResponse) XXX_DiscardUnknown ¶
func (m *GetResponse) XXX_DiscardUnknown()
func (*GetResponse) XXX_Marshal ¶
func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetResponse) XXX_Merge ¶
func (m *GetResponse) XXX_Merge(src proto.Message)
func (*GetResponse) XXX_Size ¶
func (m *GetResponse) XXX_Size() int
func (*GetResponse) XXX_Unmarshal ¶
func (m *GetResponse) XXX_Unmarshal(b []byte) error
type IncrementRequest ¶
type IncrementRequest struct {
Delta int64 `protobuf:"varint,1,opt,name=delta,proto3" json:"delta,omitempty"`
}
func (*IncrementRequest) Descriptor ¶
func (*IncrementRequest) Descriptor() ([]byte, []int)
func (*IncrementRequest) GetDelta ¶
func (m *IncrementRequest) GetDelta() int64
func (*IncrementRequest) Marshal ¶
func (m *IncrementRequest) Marshal() (dAtA []byte, err error)
func (*IncrementRequest) MarshalToSizedBuffer ¶
func (m *IncrementRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IncrementRequest) ProtoMessage ¶
func (*IncrementRequest) ProtoMessage()
func (*IncrementRequest) Reset ¶
func (m *IncrementRequest) Reset()
func (*IncrementRequest) Size ¶
func (m *IncrementRequest) Size() (n int)
func (*IncrementRequest) String ¶
func (m *IncrementRequest) String() string
func (*IncrementRequest) Unmarshal ¶
func (m *IncrementRequest) Unmarshal(dAtA []byte) error
func (*IncrementRequest) XXX_DiscardUnknown ¶
func (m *IncrementRequest) XXX_DiscardUnknown()
func (*IncrementRequest) XXX_Marshal ¶
func (m *IncrementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IncrementRequest) XXX_Merge ¶
func (m *IncrementRequest) XXX_Merge(src proto.Message)
func (*IncrementRequest) XXX_Size ¶
func (m *IncrementRequest) XXX_Size() int
func (*IncrementRequest) XXX_Unmarshal ¶
func (m *IncrementRequest) XXX_Unmarshal(b []byte) error
type IncrementResponse ¶
type IncrementResponse struct { PreviousValue int64 `protobuf:"varint,1,opt,name=previous_value,json=previousValue,proto3" json:"previous_value,omitempty"` NextValue int64 `protobuf:"varint,2,opt,name=next_value,json=nextValue,proto3" json:"next_value,omitempty"` }
func (*IncrementResponse) Descriptor ¶
func (*IncrementResponse) Descriptor() ([]byte, []int)
func (*IncrementResponse) GetNextValue ¶
func (m *IncrementResponse) GetNextValue() int64
func (*IncrementResponse) GetPreviousValue ¶
func (m *IncrementResponse) GetPreviousValue() int64
func (*IncrementResponse) Marshal ¶
func (m *IncrementResponse) Marshal() (dAtA []byte, err error)
func (*IncrementResponse) MarshalTo ¶
func (m *IncrementResponse) MarshalTo(dAtA []byte) (int, error)
func (*IncrementResponse) MarshalToSizedBuffer ¶
func (m *IncrementResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IncrementResponse) ProtoMessage ¶
func (*IncrementResponse) ProtoMessage()
func (*IncrementResponse) Reset ¶
func (m *IncrementResponse) Reset()
func (*IncrementResponse) Size ¶
func (m *IncrementResponse) Size() (n int)
func (*IncrementResponse) String ¶
func (m *IncrementResponse) String() string
func (*IncrementResponse) Unmarshal ¶
func (m *IncrementResponse) Unmarshal(dAtA []byte) error
func (*IncrementResponse) XXX_DiscardUnknown ¶
func (m *IncrementResponse) XXX_DiscardUnknown()
func (*IncrementResponse) XXX_Marshal ¶
func (m *IncrementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IncrementResponse) XXX_Merge ¶
func (m *IncrementResponse) XXX_Merge(src proto.Message)
func (*IncrementResponse) XXX_Size ¶
func (m *IncrementResponse) XXX_Size() int
func (*IncrementResponse) XXX_Unmarshal ¶
func (m *IncrementResponse) XXX_Unmarshal(b []byte) error
type Primitive ¶
type Primitive struct{}
Primitive is the counter primitive
func (*Primitive) NewService ¶
func (p *Primitive) NewService(scheduler primitive.Scheduler, context primitive.ServiceContext) primitive.Service
NewService creates a new counter service
type Server ¶
Server is an implementation of CounterServiceServer for the counter primitive
func (*Server) CheckAndSet ¶
func (s *Server) CheckAndSet(ctx context.Context, request *api.CheckAndSetRequest) (*api.CheckAndSetResponse, error)
CheckAndSet updates the value of the counter conditionally
func (*Server) Close ¶
func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)
Close closes a session
func (*Server) Create ¶
func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)
Create opens a new session
func (*Server) Decrement ¶
func (s *Server) Decrement(ctx context.Context, request *api.DecrementRequest) (*api.DecrementResponse, error)
Decrement decrements the value of the counter by a delta
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)
Get gets the current value of the counter
func (*Server) Increment ¶
func (s *Server) Increment(ctx context.Context, request *api.IncrementRequest) (*api.IncrementResponse, error)
Increment increments the value of the counter by a delta
func (*Server) Set ¶
func (s *Server) Set(ctx context.Context, request *api.SetRequest) (*api.SetResponse, error)
Set sets the current value of the counter
type Service ¶
Service is a state machine for a counter primitive
type SetRequest ¶
type SetRequest struct {
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (*SetRequest) Descriptor ¶
func (*SetRequest) Descriptor() ([]byte, []int)
func (*SetRequest) GetValue ¶
func (m *SetRequest) GetValue() int64
func (*SetRequest) Marshal ¶
func (m *SetRequest) Marshal() (dAtA []byte, err error)
func (*SetRequest) MarshalToSizedBuffer ¶
func (m *SetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SetRequest) ProtoMessage ¶
func (*SetRequest) ProtoMessage()
func (*SetRequest) Reset ¶
func (m *SetRequest) Reset()
func (*SetRequest) Size ¶
func (m *SetRequest) Size() (n int)
func (*SetRequest) String ¶
func (m *SetRequest) String() string
func (*SetRequest) Unmarshal ¶
func (m *SetRequest) Unmarshal(dAtA []byte) error
func (*SetRequest) XXX_DiscardUnknown ¶
func (m *SetRequest) XXX_DiscardUnknown()
func (*SetRequest) XXX_Marshal ¶
func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetRequest) XXX_Merge ¶
func (m *SetRequest) XXX_Merge(src proto.Message)
func (*SetRequest) XXX_Size ¶
func (m *SetRequest) XXX_Size() int
func (*SetRequest) XXX_Unmarshal ¶
func (m *SetRequest) XXX_Unmarshal(b []byte) error
type SetResponse ¶
type SetResponse struct {
PreviousValue int64 `protobuf:"varint,1,opt,name=previous_value,json=previousValue,proto3" json:"previous_value,omitempty"`
}
func (*SetResponse) Descriptor ¶
func (*SetResponse) Descriptor() ([]byte, []int)
func (*SetResponse) GetPreviousValue ¶
func (m *SetResponse) GetPreviousValue() int64
func (*SetResponse) Marshal ¶
func (m *SetResponse) Marshal() (dAtA []byte, err error)
func (*SetResponse) MarshalToSizedBuffer ¶
func (m *SetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SetResponse) ProtoMessage ¶
func (*SetResponse) ProtoMessage()
func (*SetResponse) Reset ¶
func (m *SetResponse) Reset()
func (*SetResponse) Size ¶
func (m *SetResponse) Size() (n int)
func (*SetResponse) String ¶
func (m *SetResponse) String() string
func (*SetResponse) Unmarshal ¶
func (m *SetResponse) Unmarshal(dAtA []byte) error
func (*SetResponse) XXX_DiscardUnknown ¶
func (m *SetResponse) XXX_DiscardUnknown()
func (*SetResponse) XXX_Marshal ¶
func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetResponse) XXX_Merge ¶
func (m *SetResponse) XXX_Merge(src proto.Message)
func (*SetResponse) XXX_Size ¶
func (m *SetResponse) XXX_Size() int
func (*SetResponse) XXX_Unmarshal ¶
func (m *SetResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.