messages

package
v0.0.0-...-b0718e8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthProtos        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProtos          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProtos = fmt.Errorf("proto: unexpected end of group")
)

Functions

func PongerFactory

func PongerFactory(factory func() Ponger)

PongerFactory produces a Ponger

func SetLogLevel

func SetLogLevel(level logmod.Level)

SetLogLevel sets the log level.

Types

type PingMessage

type PingMessage struct {
	Cnt uint64 `protobuf:"varint,1,opt,name=cnt,proto3" json:"cnt,omitempty"`
}

func (*PingMessage) Descriptor

func (*PingMessage) Descriptor() ([]byte, []int)

func (*PingMessage) Equal

func (this *PingMessage) Equal(that interface{}) bool

func (*PingMessage) GetCnt

func (m *PingMessage) GetCnt() uint64

func (*PingMessage) GoString

func (this *PingMessage) GoString() string

func (*PingMessage) Marshal

func (m *PingMessage) Marshal() (dAtA []byte, err error)

func (*PingMessage) MarshalTo

func (m *PingMessage) MarshalTo(dAtA []byte) (int, error)

func (*PingMessage) MarshalToSizedBuffer

func (m *PingMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PingMessage) ProtoMessage

func (*PingMessage) ProtoMessage()

func (*PingMessage) Reset

func (m *PingMessage) Reset()

func (*PingMessage) Size

func (m *PingMessage) Size() (n int)

func (*PingMessage) String

func (this *PingMessage) String() string

func (*PingMessage) Unmarshal

func (m *PingMessage) Unmarshal(dAtA []byte) error

func (*PingMessage) XXX_DiscardUnknown

func (m *PingMessage) XXX_DiscardUnknown()

func (*PingMessage) XXX_Marshal

func (m *PingMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingMessage) XXX_Merge

func (m *PingMessage) XXX_Merge(src proto.Message)

func (*PingMessage) XXX_Size

func (m *PingMessage) XXX_Size() int

func (*PingMessage) XXX_Unmarshal

func (m *PingMessage) XXX_Unmarshal(b []byte) error

type PongMessage

type PongMessage struct {
	Cnt uint64 `protobuf:"varint,1,opt,name=cnt,proto3" json:"cnt,omitempty"`
}

func (*PongMessage) Descriptor

func (*PongMessage) Descriptor() ([]byte, []int)

func (*PongMessage) Equal

func (this *PongMessage) Equal(that interface{}) bool

func (*PongMessage) GetCnt

func (m *PongMessage) GetCnt() uint64

func (*PongMessage) GoString

func (this *PongMessage) GoString() string

func (*PongMessage) Marshal

func (m *PongMessage) Marshal() (dAtA []byte, err error)

func (*PongMessage) MarshalTo

func (m *PongMessage) MarshalTo(dAtA []byte) (int, error)

func (*PongMessage) MarshalToSizedBuffer

func (m *PongMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PongMessage) ProtoMessage

func (*PongMessage) ProtoMessage()

func (*PongMessage) Reset

func (m *PongMessage) Reset()

func (*PongMessage) Size

func (m *PongMessage) Size() (n int)

func (*PongMessage) String

func (this *PongMessage) String() string

func (*PongMessage) Unmarshal

func (m *PongMessage) Unmarshal(dAtA []byte) error

func (*PongMessage) XXX_DiscardUnknown

func (m *PongMessage) XXX_DiscardUnknown()

func (*PongMessage) XXX_Marshal

func (m *PongMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PongMessage) XXX_Merge

func (m *PongMessage) XXX_Merge(src proto.Message)

func (*PongMessage) XXX_Size

func (m *PongMessage) XXX_Size() int

func (*PongMessage) XXX_Unmarshal

func (m *PongMessage) XXX_Unmarshal(b []byte) error

type Ponger

type Ponger interface {
	Init(id string)
	Terminate()
	ReceiveDefault(ctx actor.Context)
	Ping(*PingMessage, cluster.GrainContext) (*PongMessage, error)
}

Ponger interfaces the services available to the Ponger

type PongerActor

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

PongerActor represents the actor structure

func (*PongerActor) Receive

func (a *PongerActor) Receive(ctx actor.Context)

Receive ensures the lifecycle of the actor for the received message

type PongerGrainClient

type PongerGrainClient struct {
	ID string
	// contains filtered or unexported fields
}

PongerGrainClient holds the base data for the PongerGrain

func GetPongerGrainClient

func GetPongerGrainClient(c *cluster.Cluster, id string) *PongerGrainClient

GetPongerGrainClient instantiates a new PongerGrainClient with given ID

func (*PongerGrainClient) Ping

Ping requests the execution on to the cluster with CallOptions

Jump to

Keyboard shortcuts

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