Documentation ¶
Overview ¶
Package protobuf is generated by protoactor-go/protoc-gen-gograin@0.1.0
Index ¶
- Variables
- func AdminFactory(factory func() Admin)
- func GetAdminKind(opts ...actor.PropsOption) *cluster.Kind
- func GetInventoryKind(opts ...actor.PropsOption) *cluster.Kind
- func GetTimerKind(opts ...actor.PropsOption) *cluster.Kind
- func InventoryFactory(factory func() Inventory)
- func NewAdminKind(factory func() Admin, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
- func NewInventoryKind(factory func() Inventory, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
- func NewTimerKind(factory func() Timer, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
- func SetLogLevel(level logmod.Level)
- func TimerFactory(factory func() Timer)
- type Admin
- type AdminActor
- type AdminGrainClient
- type BuildingBlueprint
- func (*BuildingBlueprint) Descriptor() ([]byte, []int)deprecated
- func (x *BuildingBlueprint) GetDuration() string
- func (x *BuildingBlueprint) GetID() string
- func (x *BuildingBlueprint) GetName() string
- func (x *BuildingBlueprint) GetResources() []*Cost
- func (*BuildingBlueprint) ProtoMessage()
- func (x *BuildingBlueprint) ProtoReflect() protoreflect.Message
- func (x *BuildingBlueprint) Reset()
- func (x *BuildingBlueprint) String() string
- type Cost
- type DescribeInventoryRequest
- func (*DescribeInventoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeInventoryRequest) GetTimestamp() *timestamppb.Timestamp
- func (x *DescribeInventoryRequest) GetTraceID() string
- func (*DescribeInventoryRequest) ProtoMessage()
- func (x *DescribeInventoryRequest) ProtoReflect() protoreflect.Message
- func (x *DescribeInventoryRequest) Reset()
- func (x *DescribeInventoryRequest) String() string
- type DescribeInventoryResponse
- func (*DescribeInventoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeInventoryResponse) GetInventory() *structpb.Struct
- func (x *DescribeInventoryResponse) GetTimestamp() *timestamppb.Timestamp
- func (*DescribeInventoryResponse) ProtoMessage()
- func (x *DescribeInventoryResponse) ProtoReflect() protoreflect.Message
- func (x *DescribeInventoryResponse) Reset()
- func (x *DescribeInventoryResponse) String() string
- type Empty
- type FinishResponse
- func (*FinishResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FinishResponse) GetError() string
- func (x *FinishResponse) GetStatus() Status
- func (x *FinishResponse) GetTimestamp() *timestamppb.Timestamp
- func (*FinishResponse) ProtoMessage()
- func (x *FinishResponse) ProtoReflect() protoreflect.Message
- func (x *FinishResponse) Reset()
- func (x *FinishResponse) String() string
- type GrainKind
- type GrainUpdate
- func (*GrainUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *GrainUpdate) GetGrainKind() GrainKind
- func (x *GrainUpdate) GetIdentity() string
- func (x *GrainUpdate) GetTimestamp() *timestamppb.Timestamp
- func (x *GrainUpdate) GetUpdateKind() UpdateKind
- func (*GrainUpdate) ProtoMessage()
- func (x *GrainUpdate) ProtoReflect() protoreflect.Message
- func (x *GrainUpdate) Reset()
- func (x *GrainUpdate) String() string
- type Inventory
- type InventoryActor
- type InventoryGrainClient
- func (g *InventoryGrainClient) Describe(r *DescribeInventoryRequest, opts ...cluster.GrainCallOption) (*DescribeInventoryResponse, error)
- func (g *InventoryGrainClient) Reserve(r *ReserveRequest, opts ...cluster.GrainCallOption) (*ReserveResponse, error)
- func (g *InventoryGrainClient) Restore(r *RestoreRequest, opts ...cluster.GrainCallOption) (*RestoreResponse, error)
- func (g *InventoryGrainClient) Start(r *StartRequest, opts ...cluster.GrainCallOption) (*StartResponse, error)
- type ReserveRequest
- func (*ReserveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReserveRequest) GetResources() *structpb.Struct
- func (x *ReserveRequest) GetTimestamp() *timestamppb.Timestamp
- func (x *ReserveRequest) GetTraceID() string
- func (*ReserveRequest) ProtoMessage()
- func (x *ReserveRequest) ProtoReflect() protoreflect.Message
- func (x *ReserveRequest) Reset()
- func (x *ReserveRequest) String() string
- type ReserveResponse
- func (*ReserveResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReserveResponse) GetError() string
- func (x *ReserveResponse) GetStatus() Status
- func (x *ReserveResponse) GetTimestamp() *timestamppb.Timestamp
- func (*ReserveResponse) ProtoMessage()
- func (x *ReserveResponse) ProtoReflect() protoreflect.Message
- func (x *ReserveResponse) Reset()
- func (x *ReserveResponse) String() string
- type RestoreRequest
- type RestoreResponse
- func (*RestoreResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RestoreResponse) GetError() string
- func (x *RestoreResponse) GetStatus() Status
- func (*RestoreResponse) ProtoMessage()
- func (x *RestoreResponse) ProtoReflect() protoreflect.Message
- func (x *RestoreResponse) Reset()
- func (x *RestoreResponse) String() string
- type StartRequest
- func (*StartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartRequest) GetAmount() int64
- func (x *StartRequest) GetName() string
- func (x *StartRequest) GetTimestamp() *timestamppb.Timestamp
- func (x *StartRequest) GetTraceID() string
- func (*StartRequest) ProtoMessage()
- func (x *StartRequest) ProtoReflect() protoreflect.Message
- func (x *StartRequest) Reset()
- func (x *StartRequest) String() string
- type StartResponse
- func (*StartResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StartResponse) GetError() string
- func (x *StartResponse) GetStatus() Status
- func (x *StartResponse) GetTimestamp() *timestamppb.Timestamp
- func (*StartResponse) ProtoMessage()
- func (x *StartResponse) ProtoReflect() protoreflect.Message
- func (x *StartResponse) Reset()
- func (x *StartResponse) String() string
- type Status
- type Timer
- type TimerActor
- type TimerFired
- func (*TimerFired) Descriptor() ([]byte, []int)deprecated
- func (x *TimerFired) GetData() *structpb.Struct
- func (x *TimerFired) GetTimestamp() *timestamppb.Timestamp
- func (*TimerFired) ProtoMessage()
- func (x *TimerFired) ProtoReflect() protoreflect.Message
- func (x *TimerFired) Reset()
- func (x *TimerFired) String() string
- type TimerGrainClient
- type TimerKind
- type TimerRequest
- func (*TimerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TimerRequest) GetData() *structpb.Struct
- func (x *TimerRequest) GetDuration() string
- func (x *TimerRequest) GetInventoryID() string
- func (x *TimerRequest) GetKind() TimerKind
- func (x *TimerRequest) GetReply() string
- func (x *TimerRequest) GetTimestamp() *timestamppb.Timestamp
- func (x *TimerRequest) GetTraceID() string
- func (*TimerRequest) ProtoMessage()
- func (x *TimerRequest) ProtoReflect() protoreflect.Message
- func (x *TimerRequest) Reset()
- func (x *TimerRequest) String() string
- type TimerResponse
- func (*TimerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TimerResponse) GetDeadline() *timestamppb.Timestamp
- func (x *TimerResponse) GetError() string
- func (x *TimerResponse) GetStatus() Status
- func (x *TimerResponse) GetTimestamp() *timestamppb.Timestamp
- func (*TimerResponse) ProtoMessage()
- func (x *TimerResponse) ProtoReflect() protoreflect.Message
- func (x *TimerResponse) Reset()
- func (x *TimerResponse) String() string
- type UpdateKind
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "Unknown", 1: "OK", 2: "Error", } Status_value = map[string]int32{ "Unknown": 0, "OK": 1, "Error": 2, } )
Enum value maps for Status.
var ( TimerKind_name = map[int32]string{ 0: "UnknownTimer", 1: "Building", 2: "Generator", 3: "Transformer", } TimerKind_value = map[string]int32{ "UnknownTimer": 0, "Building": 1, "Generator": 2, "Transformer": 3, } )
Enum value maps for TimerKind.
var ( GrainKind_name = map[int32]string{ 0: "UnknownGrain", 1: "AdminGrain", 2: "InventoryGrain", 3: "TimerGrain", } GrainKind_value = map[string]int32{ "UnknownGrain": 0, "AdminGrain": 1, "InventoryGrain": 2, "TimerGrain": 3, } )
Enum value maps for GrainKind.
var ( UpdateKind_name = map[int32]string{ 0: "Heartbeat", 1: "Register", 2: "Deregister", } UpdateKind_value = map[string]int32{ "Heartbeat": 0, "Register": 1, "Deregister": 2, } )
Enum value maps for UpdateKind.
var File_common_proto protoreflect.FileDescriptor
var File_registry_proto protoreflect.FileDescriptor
Functions ¶
func AdminFactory ¶ added in v0.28.0
func AdminFactory(factory func() Admin)
AdminFactory produces a Admin
func GetAdminKind ¶ added in v0.28.0
func GetAdminKind(opts ...actor.PropsOption) *cluster.Kind
GetAdminKind instantiates a new cluster.Kind for Admin
func GetInventoryKind ¶
func GetInventoryKind(opts ...actor.PropsOption) *cluster.Kind
GetInventoryKind instantiates a new cluster.Kind for Inventory
func GetTimerKind ¶
func GetTimerKind(opts ...actor.PropsOption) *cluster.Kind
GetTimerKind instantiates a new cluster.Kind for Timer
func InventoryFactory ¶
func InventoryFactory(factory func() Inventory)
InventoryFactory produces a Inventory
func NewAdminKind ¶ added in v0.28.0
func NewAdminKind(factory func() Admin, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
GetAdminKind instantiates a new cluster.Kind for Admin
func NewInventoryKind ¶
func NewInventoryKind(factory func() Inventory, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
GetInventoryKind instantiates a new cluster.Kind for Inventory
func NewTimerKind ¶
func NewTimerKind(factory func() Timer, timeout time.Duration, opts ...actor.PropsOption) *cluster.Kind
GetTimerKind instantiates a new cluster.Kind for Timer
Types ¶
type Admin ¶ added in v0.28.0
type Admin interface { Init(ctx cluster.GrainContext) Terminate(ctx cluster.GrainContext) ReceiveDefault(ctx cluster.GrainContext) Start(*Empty, cluster.GrainContext) (*Empty, error) }
Admin interfaces the services available to the Admin
type AdminActor ¶ added in v0.28.0
AdminActor represents the actor structure
func (*AdminActor) Receive ¶ added in v0.28.0
func (a *AdminActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type AdminGrainClient ¶ added in v0.28.0
type AdminGrainClient struct { Identity string // contains filtered or unexported fields }
AdminGrainClient holds the base data for the AdminGrain
func GetAdminGrainClient ¶ added in v0.28.0
func GetAdminGrainClient(c *cluster.Cluster, id string) *AdminGrainClient
GetAdminGrainClient instantiates a new AdminGrainClient with given Identity
func (*AdminGrainClient) Start ¶ added in v0.28.0
func (g *AdminGrainClient) Start(r *Empty, opts ...cluster.GrainCallOption) (*Empty, error)
Start requests the execution on to the cluster with CallOptions
type BuildingBlueprint ¶
type BuildingBlueprint struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Resources []*Cost `protobuf:"bytes,3,rep,name=Resources,proto3" json:"Resources,omitempty"` Duration string `protobuf:"bytes,4,opt,name=Duration,proto3" json:"Duration,omitempty"` // contains filtered or unexported fields }
func (*BuildingBlueprint) Descriptor
deprecated
func (*BuildingBlueprint) Descriptor() ([]byte, []int)
Deprecated: Use BuildingBlueprint.ProtoReflect.Descriptor instead.
func (*BuildingBlueprint) GetDuration ¶
func (x *BuildingBlueprint) GetDuration() string
func (*BuildingBlueprint) GetID ¶
func (x *BuildingBlueprint) GetID() string
func (*BuildingBlueprint) GetName ¶
func (x *BuildingBlueprint) GetName() string
func (*BuildingBlueprint) GetResources ¶
func (x *BuildingBlueprint) GetResources() []*Cost
func (*BuildingBlueprint) ProtoMessage ¶
func (*BuildingBlueprint) ProtoMessage()
func (*BuildingBlueprint) ProtoReflect ¶
func (x *BuildingBlueprint) ProtoReflect() protoreflect.Message
func (*BuildingBlueprint) Reset ¶
func (x *BuildingBlueprint) Reset()
func (*BuildingBlueprint) String ¶
func (x *BuildingBlueprint) String() string
type Cost ¶
type Cost struct { Resource string `protobuf:"bytes,1,opt,name=Resource,proto3" json:"Resource,omitempty"` Amount int64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` // contains filtered or unexported fields }
func (*Cost) Descriptor
deprecated
func (*Cost) GetResource ¶
func (*Cost) ProtoMessage ¶
func (*Cost) ProtoMessage()
func (*Cost) ProtoReflect ¶
func (x *Cost) ProtoReflect() protoreflect.Message
type DescribeInventoryRequest ¶
type DescribeInventoryRequest struct { TraceID string `protobuf:"bytes,1,opt,name=TraceID,proto3" json:"TraceID,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*DescribeInventoryRequest) Descriptor
deprecated
func (*DescribeInventoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeInventoryRequest.ProtoReflect.Descriptor instead.
func (*DescribeInventoryRequest) GetTimestamp ¶
func (x *DescribeInventoryRequest) GetTimestamp() *timestamppb.Timestamp
func (*DescribeInventoryRequest) GetTraceID ¶
func (x *DescribeInventoryRequest) GetTraceID() string
func (*DescribeInventoryRequest) ProtoMessage ¶
func (*DescribeInventoryRequest) ProtoMessage()
func (*DescribeInventoryRequest) ProtoReflect ¶
func (x *DescribeInventoryRequest) ProtoReflect() protoreflect.Message
func (*DescribeInventoryRequest) Reset ¶
func (x *DescribeInventoryRequest) Reset()
func (*DescribeInventoryRequest) String ¶
func (x *DescribeInventoryRequest) String() string
type DescribeInventoryResponse ¶
type DescribeInventoryResponse struct { Inventory *structpb.Struct `protobuf:"bytes,1,opt,name=Inventory,proto3" json:"Inventory,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*DescribeInventoryResponse) Descriptor
deprecated
func (*DescribeInventoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescribeInventoryResponse.ProtoReflect.Descriptor instead.
func (*DescribeInventoryResponse) GetInventory ¶
func (x *DescribeInventoryResponse) GetInventory() *structpb.Struct
func (*DescribeInventoryResponse) GetTimestamp ¶
func (x *DescribeInventoryResponse) GetTimestamp() *timestamppb.Timestamp
func (*DescribeInventoryResponse) ProtoMessage ¶
func (*DescribeInventoryResponse) ProtoMessage()
func (*DescribeInventoryResponse) ProtoReflect ¶
func (x *DescribeInventoryResponse) ProtoReflect() protoreflect.Message
func (*DescribeInventoryResponse) Reset ¶
func (x *DescribeInventoryResponse) Reset()
func (*DescribeInventoryResponse) String ¶
func (x *DescribeInventoryResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type FinishResponse ¶
type FinishResponse struct { Status Status `protobuf:"varint,1,opt,name=Status,proto3,enum=proto.Status" json:"Status,omitempty"` Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*FinishResponse) Descriptor
deprecated
func (*FinishResponse) Descriptor() ([]byte, []int)
Deprecated: Use FinishResponse.ProtoReflect.Descriptor instead.
func (*FinishResponse) GetError ¶
func (x *FinishResponse) GetError() string
func (*FinishResponse) GetStatus ¶
func (x *FinishResponse) GetStatus() Status
func (*FinishResponse) GetTimestamp ¶
func (x *FinishResponse) GetTimestamp() *timestamppb.Timestamp
func (*FinishResponse) ProtoMessage ¶
func (*FinishResponse) ProtoMessage()
func (*FinishResponse) ProtoReflect ¶
func (x *FinishResponse) ProtoReflect() protoreflect.Message
func (*FinishResponse) Reset ¶
func (x *FinishResponse) Reset()
func (*FinishResponse) String ¶
func (x *FinishResponse) String() string
type GrainKind ¶ added in v0.28.0
type GrainKind int32
func (GrainKind) Descriptor ¶ added in v0.28.0
func (GrainKind) Descriptor() protoreflect.EnumDescriptor
func (GrainKind) EnumDescriptor
deprecated
added in
v0.28.0
func (GrainKind) Number ¶ added in v0.28.0
func (x GrainKind) Number() protoreflect.EnumNumber
func (GrainKind) Type ¶ added in v0.28.0
func (GrainKind) Type() protoreflect.EnumType
type GrainUpdate ¶ added in v0.28.0
type GrainUpdate struct { UpdateKind UpdateKind `protobuf:"varint,1,opt,name=UpdateKind,proto3,enum=proto.UpdateKind" json:"UpdateKind,omitempty"` GrainKind GrainKind `protobuf:"varint,2,opt,name=GrainKind,proto3,enum=proto.GrainKind" json:"GrainKind,omitempty"` Identity string `protobuf:"bytes,4,opt,name=Identity,proto3" json:"Identity,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*GrainUpdate) Descriptor
deprecated
added in
v0.28.0
func (*GrainUpdate) Descriptor() ([]byte, []int)
Deprecated: Use GrainUpdate.ProtoReflect.Descriptor instead.
func (*GrainUpdate) GetGrainKind ¶ added in v0.28.0
func (x *GrainUpdate) GetGrainKind() GrainKind
func (*GrainUpdate) GetIdentity ¶ added in v0.28.0
func (x *GrainUpdate) GetIdentity() string
func (*GrainUpdate) GetTimestamp ¶ added in v0.28.0
func (x *GrainUpdate) GetTimestamp() *timestamppb.Timestamp
func (*GrainUpdate) GetUpdateKind ¶ added in v0.28.0
func (x *GrainUpdate) GetUpdateKind() UpdateKind
func (*GrainUpdate) ProtoMessage ¶ added in v0.28.0
func (*GrainUpdate) ProtoMessage()
func (*GrainUpdate) ProtoReflect ¶ added in v0.28.0
func (x *GrainUpdate) ProtoReflect() protoreflect.Message
func (*GrainUpdate) Reset ¶ added in v0.28.0
func (x *GrainUpdate) Reset()
func (*GrainUpdate) String ¶ added in v0.28.0
func (x *GrainUpdate) String() string
type Inventory ¶
type Inventory interface { Init(ctx cluster.GrainContext) Terminate(ctx cluster.GrainContext) ReceiveDefault(ctx cluster.GrainContext) Start(*StartRequest, cluster.GrainContext) (*StartResponse, error) Describe(*DescribeInventoryRequest, cluster.GrainContext) (*DescribeInventoryResponse, error) Restore(*RestoreRequest, cluster.GrainContext) (*RestoreResponse, error) Reserve(*ReserveRequest, cluster.GrainContext) (*ReserveResponse, error) }
Inventory interfaces the services available to the Inventory
type InventoryActor ¶
InventoryActor represents the actor structure
func (*InventoryActor) Receive ¶
func (a *InventoryActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type InventoryGrainClient ¶
type InventoryGrainClient struct { Identity string // contains filtered or unexported fields }
InventoryGrainClient holds the base data for the InventoryGrain
func GetInventoryGrainClient ¶
func GetInventoryGrainClient(c *cluster.Cluster, id string) *InventoryGrainClient
GetInventoryGrainClient instantiates a new InventoryGrainClient with given Identity
func (*InventoryGrainClient) Describe ¶
func (g *InventoryGrainClient) Describe(r *DescribeInventoryRequest, opts ...cluster.GrainCallOption) (*DescribeInventoryResponse, error)
Describe requests the execution on to the cluster with CallOptions
func (*InventoryGrainClient) Reserve ¶ added in v0.2.0
func (g *InventoryGrainClient) Reserve(r *ReserveRequest, opts ...cluster.GrainCallOption) (*ReserveResponse, error)
Reserve requests the execution on to the cluster with CallOptions
func (*InventoryGrainClient) Restore ¶
func (g *InventoryGrainClient) Restore(r *RestoreRequest, opts ...cluster.GrainCallOption) (*RestoreResponse, error)
Restore requests the execution on to the cluster with CallOptions
func (*InventoryGrainClient) Start ¶
func (g *InventoryGrainClient) Start(r *StartRequest, opts ...cluster.GrainCallOption) (*StartResponse, error)
Start requests the execution on to the cluster with CallOptions
type ReserveRequest ¶ added in v0.2.0
type ReserveRequest struct { TraceID string `protobuf:"bytes,1,opt,name=TraceID,proto3" json:"TraceID,omitempty"` Resources *structpb.Struct `protobuf:"bytes,2,opt,name=Resources,proto3" json:"Resources,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*ReserveRequest) Descriptor
deprecated
added in
v0.2.0
func (*ReserveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReserveRequest.ProtoReflect.Descriptor instead.
func (*ReserveRequest) GetResources ¶ added in v0.2.0
func (x *ReserveRequest) GetResources() *structpb.Struct
func (*ReserveRequest) GetTimestamp ¶ added in v0.2.0
func (x *ReserveRequest) GetTimestamp() *timestamppb.Timestamp
func (*ReserveRequest) GetTraceID ¶ added in v0.16.4
func (x *ReserveRequest) GetTraceID() string
func (*ReserveRequest) ProtoMessage ¶ added in v0.2.0
func (*ReserveRequest) ProtoMessage()
func (*ReserveRequest) ProtoReflect ¶ added in v0.2.0
func (x *ReserveRequest) ProtoReflect() protoreflect.Message
func (*ReserveRequest) Reset ¶ added in v0.2.0
func (x *ReserveRequest) Reset()
func (*ReserveRequest) String ¶ added in v0.2.0
func (x *ReserveRequest) String() string
type ReserveResponse ¶ added in v0.2.0
type ReserveResponse struct { Status Status `protobuf:"varint,1,opt,name=Status,proto3,enum=proto.Status" json:"Status,omitempty"` Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*ReserveResponse) Descriptor
deprecated
added in
v0.2.0
func (*ReserveResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReserveResponse.ProtoReflect.Descriptor instead.
func (*ReserveResponse) GetError ¶ added in v0.2.0
func (x *ReserveResponse) GetError() string
func (*ReserveResponse) GetStatus ¶ added in v0.2.0
func (x *ReserveResponse) GetStatus() Status
func (*ReserveResponse) GetTimestamp ¶ added in v0.2.0
func (x *ReserveResponse) GetTimestamp() *timestamppb.Timestamp
func (*ReserveResponse) ProtoMessage ¶ added in v0.2.0
func (*ReserveResponse) ProtoMessage()
func (*ReserveResponse) ProtoReflect ¶ added in v0.2.0
func (x *ReserveResponse) ProtoReflect() protoreflect.Message
func (*ReserveResponse) Reset ¶ added in v0.2.0
func (x *ReserveResponse) Reset()
func (*ReserveResponse) String ¶ added in v0.2.0
func (x *ReserveResponse) String() string
type RestoreRequest ¶
type RestoreRequest struct { Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func (*RestoreRequest) Descriptor
deprecated
func (*RestoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use RestoreRequest.ProtoReflect.Descriptor instead.
func (*RestoreRequest) GetData ¶
func (x *RestoreRequest) GetData() []byte
func (*RestoreRequest) ProtoMessage ¶
func (*RestoreRequest) ProtoMessage()
func (*RestoreRequest) ProtoReflect ¶
func (x *RestoreRequest) ProtoReflect() protoreflect.Message
func (*RestoreRequest) Reset ¶
func (x *RestoreRequest) Reset()
func (*RestoreRequest) String ¶
func (x *RestoreRequest) String() string
type RestoreResponse ¶
type RestoreResponse struct { Status Status `protobuf:"varint,1,opt,name=Status,proto3,enum=proto.Status" json:"Status,omitempty"` Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` // contains filtered or unexported fields }
func (*RestoreResponse) Descriptor
deprecated
func (*RestoreResponse) Descriptor() ([]byte, []int)
Deprecated: Use RestoreResponse.ProtoReflect.Descriptor instead.
func (*RestoreResponse) GetError ¶
func (x *RestoreResponse) GetError() string
func (*RestoreResponse) GetStatus ¶
func (x *RestoreResponse) GetStatus() Status
func (*RestoreResponse) ProtoMessage ¶
func (*RestoreResponse) ProtoMessage()
func (*RestoreResponse) ProtoReflect ¶
func (x *RestoreResponse) ProtoReflect() protoreflect.Message
func (*RestoreResponse) Reset ¶
func (x *RestoreResponse) Reset()
func (*RestoreResponse) String ¶
func (x *RestoreResponse) String() string
type StartRequest ¶
type StartRequest struct { TraceID string `protobuf:"bytes,1,opt,name=TraceID,proto3" json:"TraceID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*StartRequest) Descriptor
deprecated
func (*StartRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetAmount ¶
func (x *StartRequest) GetAmount() int64
func (*StartRequest) GetName ¶
func (x *StartRequest) GetName() string
func (*StartRequest) GetTimestamp ¶
func (x *StartRequest) GetTimestamp() *timestamppb.Timestamp
func (*StartRequest) GetTraceID ¶ added in v0.16.4
func (x *StartRequest) GetTraceID() string
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) ProtoReflect ¶
func (x *StartRequest) ProtoReflect() protoreflect.Message
func (*StartRequest) Reset ¶
func (x *StartRequest) Reset()
func (*StartRequest) String ¶
func (x *StartRequest) String() string
type StartResponse ¶
type StartResponse struct { Status Status `protobuf:"varint,1,opt,name=Status,proto3,enum=proto.Status" json:"Status,omitempty"` Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*StartResponse) Descriptor
deprecated
func (*StartResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.
func (*StartResponse) GetError ¶
func (x *StartResponse) GetError() string
func (*StartResponse) GetStatus ¶
func (x *StartResponse) GetStatus() Status
func (*StartResponse) GetTimestamp ¶
func (x *StartResponse) GetTimestamp() *timestamppb.Timestamp
func (*StartResponse) ProtoMessage ¶
func (*StartResponse) ProtoMessage()
func (*StartResponse) ProtoReflect ¶
func (x *StartResponse) ProtoReflect() protoreflect.Message
func (*StartResponse) Reset ¶
func (x *StartResponse) Reset()
func (*StartResponse) String ¶
func (x *StartResponse) String() string
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type Timer ¶
type Timer interface { Init(ctx cluster.GrainContext) Terminate(ctx cluster.GrainContext) ReceiveDefault(ctx cluster.GrainContext) CreateTimer(*TimerRequest, cluster.GrainContext) (*TimerResponse, error) Restore(*RestoreRequest, cluster.GrainContext) (*RestoreResponse, error) }
Timer interfaces the services available to the Timer
type TimerActor ¶
TimerActor represents the actor structure
func (*TimerActor) Receive ¶
func (a *TimerActor) Receive(ctx actor.Context)
Receive ensures the lifecycle of the actor for the received message
type TimerFired ¶
type TimerFired struct { Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Data *structpb.Struct `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func (*TimerFired) Descriptor
deprecated
func (*TimerFired) Descriptor() ([]byte, []int)
Deprecated: Use TimerFired.ProtoReflect.Descriptor instead.
func (*TimerFired) GetData ¶
func (x *TimerFired) GetData() *structpb.Struct
func (*TimerFired) GetTimestamp ¶
func (x *TimerFired) GetTimestamp() *timestamppb.Timestamp
func (*TimerFired) ProtoMessage ¶
func (*TimerFired) ProtoMessage()
func (*TimerFired) ProtoReflect ¶
func (x *TimerFired) ProtoReflect() protoreflect.Message
func (*TimerFired) Reset ¶
func (x *TimerFired) Reset()
func (*TimerFired) String ¶
func (x *TimerFired) String() string
type TimerGrainClient ¶
type TimerGrainClient struct { Identity string // contains filtered or unexported fields }
TimerGrainClient holds the base data for the TimerGrain
func GetTimerGrainClient ¶
func GetTimerGrainClient(c *cluster.Cluster, id string) *TimerGrainClient
GetTimerGrainClient instantiates a new TimerGrainClient with given Identity
func (*TimerGrainClient) CreateTimer ¶
func (g *TimerGrainClient) CreateTimer(r *TimerRequest, opts ...cluster.GrainCallOption) (*TimerResponse, error)
CreateTimer requests the execution on to the cluster with CallOptions
func (*TimerGrainClient) Restore ¶
func (g *TimerGrainClient) Restore(r *RestoreRequest, opts ...cluster.GrainCallOption) (*RestoreResponse, error)
Restore requests the execution on to the cluster with CallOptions
type TimerKind ¶ added in v0.2.0
type TimerKind int32
func (TimerKind) Descriptor ¶ added in v0.2.0
func (TimerKind) Descriptor() protoreflect.EnumDescriptor
func (TimerKind) EnumDescriptor
deprecated
added in
v0.2.0
func (TimerKind) Number ¶ added in v0.2.0
func (x TimerKind) Number() protoreflect.EnumNumber
func (TimerKind) Type ¶ added in v0.2.0
func (TimerKind) Type() protoreflect.EnumType
type TimerRequest ¶
type TimerRequest struct { TraceID string `protobuf:"bytes,1,opt,name=TraceID,proto3" json:"TraceID,omitempty"` Kind TimerKind `protobuf:"varint,2,opt,name=Kind,proto3,enum=proto.TimerKind" json:"Kind,omitempty"` Reply string `protobuf:"bytes,3,opt,name=Reply,proto3" json:"Reply,omitempty"` Duration string `protobuf:"bytes,4,opt,name=Duration,proto3" json:"Duration,omitempty"` InventoryID string `protobuf:"bytes,5,opt,name=InventoryID,proto3" json:"InventoryID,omitempty"` Data *structpb.Struct `protobuf:"bytes,6,opt,name=Data,proto3" json:"Data,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*TimerRequest) Descriptor
deprecated
func (*TimerRequest) Descriptor() ([]byte, []int)
Deprecated: Use TimerRequest.ProtoReflect.Descriptor instead.
func (*TimerRequest) GetData ¶
func (x *TimerRequest) GetData() *structpb.Struct
func (*TimerRequest) GetDuration ¶
func (x *TimerRequest) GetDuration() string
func (*TimerRequest) GetInventoryID ¶ added in v0.2.0
func (x *TimerRequest) GetInventoryID() string
func (*TimerRequest) GetKind ¶ added in v0.2.0
func (x *TimerRequest) GetKind() TimerKind
func (*TimerRequest) GetReply ¶
func (x *TimerRequest) GetReply() string
func (*TimerRequest) GetTimestamp ¶
func (x *TimerRequest) GetTimestamp() *timestamppb.Timestamp
func (*TimerRequest) GetTraceID ¶
func (x *TimerRequest) GetTraceID() string
func (*TimerRequest) ProtoMessage ¶
func (*TimerRequest) ProtoMessage()
func (*TimerRequest) ProtoReflect ¶
func (x *TimerRequest) ProtoReflect() protoreflect.Message
func (*TimerRequest) Reset ¶
func (x *TimerRequest) Reset()
func (*TimerRequest) String ¶
func (x *TimerRequest) String() string
type TimerResponse ¶
type TimerResponse struct { Status Status `protobuf:"varint,1,opt,name=Status,proto3,enum=proto.Status" json:"Status,omitempty"` Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` Deadline *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Deadline,proto3" json:"Deadline,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // contains filtered or unexported fields }
func (*TimerResponse) Descriptor
deprecated
func (*TimerResponse) Descriptor() ([]byte, []int)
Deprecated: Use TimerResponse.ProtoReflect.Descriptor instead.
func (*TimerResponse) GetDeadline ¶
func (x *TimerResponse) GetDeadline() *timestamppb.Timestamp
func (*TimerResponse) GetError ¶
func (x *TimerResponse) GetError() string
func (*TimerResponse) GetStatus ¶
func (x *TimerResponse) GetStatus() Status
func (*TimerResponse) GetTimestamp ¶
func (x *TimerResponse) GetTimestamp() *timestamppb.Timestamp
func (*TimerResponse) ProtoMessage ¶
func (*TimerResponse) ProtoMessage()
func (*TimerResponse) ProtoReflect ¶
func (x *TimerResponse) ProtoReflect() protoreflect.Message
func (*TimerResponse) Reset ¶
func (x *TimerResponse) Reset()
func (*TimerResponse) String ¶
func (x *TimerResponse) String() string
type UpdateKind ¶ added in v0.28.0
type UpdateKind int32
const ( UpdateKind_Heartbeat UpdateKind = 0 UpdateKind_Register UpdateKind = 1 UpdateKind_Deregister UpdateKind = 2 )
func (UpdateKind) Descriptor ¶ added in v0.28.0
func (UpdateKind) Descriptor() protoreflect.EnumDescriptor
func (UpdateKind) Enum ¶ added in v0.28.0
func (x UpdateKind) Enum() *UpdateKind
func (UpdateKind) EnumDescriptor
deprecated
added in
v0.28.0
func (UpdateKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use UpdateKind.Descriptor instead.
func (UpdateKind) Number ¶ added in v0.28.0
func (x UpdateKind) Number() protoreflect.EnumNumber
func (UpdateKind) String ¶ added in v0.28.0
func (x UpdateKind) String() string
func (UpdateKind) Type ¶ added in v0.28.0
func (UpdateKind) Type() protoreflect.EnumType