protobuf

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package protobuf is generated by protoactor-go/protoc-gen-gograin@0.1.0

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var File_common_proto protoreflect.FileDescriptor
View Source
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

func SetLogLevel

func SetLogLevel(level logmod.Level)

SetLogLevel sets the log level.

func TimerFactory

func TimerFactory(factory func() Timer)

TimerFactory produces a 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

type AdminActor struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Cost.ProtoReflect.Descriptor instead.

func (*Cost) GetAmount

func (x *Cost) GetAmount() int64

func (*Cost) GetResource

func (x *Cost) GetResource() string

func (*Cost) ProtoMessage

func (*Cost) ProtoMessage()

func (*Cost) ProtoReflect

func (x *Cost) ProtoReflect() protoreflect.Message

func (*Cost) Reset

func (x *Cost) Reset()

func (*Cost) String

func (x *Cost) String() string

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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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
const (
	GrainKind_UnknownGrain   GrainKind = 0
	GrainKind_AdminGrain     GrainKind = 1
	GrainKind_InventoryGrain GrainKind = 2
	GrainKind_TimerGrain     GrainKind = 3
)

func (GrainKind) Descriptor added in v0.28.0

func (GrainKind) Descriptor() protoreflect.EnumDescriptor

func (GrainKind) Enum added in v0.28.0

func (x GrainKind) Enum() *GrainKind

func (GrainKind) EnumDescriptor deprecated added in v0.28.0

func (GrainKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrainKind.Descriptor instead.

func (GrainKind) Number added in v0.28.0

func (x GrainKind) Number() protoreflect.EnumNumber

func (GrainKind) String added in v0.28.0

func (x GrainKind) String() string

func (GrainKind) Type added in v0.28.0

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

Inventory interfaces the services available to the Inventory

type InventoryActor

type InventoryActor struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

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

Describe requests the execution on to the cluster with CallOptions

func (*InventoryGrainClient) Reserve added in v0.2.0

Reserve requests the execution on to the cluster with CallOptions

func (*InventoryGrainClient) Restore

Restore requests the execution on to the cluster with CallOptions

func (*InventoryGrainClient) Start

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
const (
	Status_Unknown Status = 0
	Status_OK      Status = 1
	Status_Error   Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

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

type TimerActor struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

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

Restore requests the execution on to the cluster with CallOptions

type TimerKind added in v0.2.0

type TimerKind int32
const (
	TimerKind_UnknownTimer TimerKind = 0
	TimerKind_Building     TimerKind = 1
	TimerKind_Generator    TimerKind = 2
	TimerKind_Transformer  TimerKind = 3
)

func (TimerKind) Descriptor added in v0.2.0

func (TimerKind) Descriptor() protoreflect.EnumDescriptor

func (TimerKind) Enum added in v0.2.0

func (x TimerKind) Enum() *TimerKind

func (TimerKind) EnumDescriptor deprecated added in v0.2.0

func (TimerKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use TimerKind.Descriptor instead.

func (TimerKind) Number added in v0.2.0

func (x TimerKind) Number() protoreflect.EnumNumber

func (TimerKind) String added in v0.2.0

func (x TimerKind) String() string

func (TimerKind) Type added in v0.2.0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL