shared

package
v0.0.0-...-f6ceceb Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

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 HelloFactory

func HelloFactory(factory func() Hello)

HelloFactory produces a Hello

func RegisterHelloServer

func RegisterHelloServer(s *grpc.Server, srv HelloServer)

Types

type AddRequest

type AddRequest struct {
	A float64 `protobuf:"fixed64,1,opt,name=a,proto3" json:"a,omitempty"`
	B float64 `protobuf:"fixed64,2,opt,name=b,proto3" json:"b,omitempty"`
}

func (*AddRequest) Descriptor

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

func (*AddRequest) Equal

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

func (*AddRequest) GetA

func (m *AddRequest) GetA() float64

func (*AddRequest) GetB

func (m *AddRequest) GetB() float64

func (*AddRequest) GoString

func (this *AddRequest) GoString() string

func (*AddRequest) Marshal

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

func (*AddRequest) MarshalTo

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

func (*AddRequest) MarshalToSizedBuffer

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

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) Reset

func (m *AddRequest) Reset()

func (*AddRequest) Size

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

func (*AddRequest) String

func (this *AddRequest) String() string

func (*AddRequest) Unmarshal

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

func (*AddRequest) XXX_DiscardUnknown

func (m *AddRequest) XXX_DiscardUnknown()

func (*AddRequest) XXX_Marshal

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

func (*AddRequest) XXX_Merge

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

func (*AddRequest) XXX_Size

func (m *AddRequest) XXX_Size() int

func (*AddRequest) XXX_Unmarshal

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

type AddResponse

type AddResponse struct {
	Result float64 `protobuf:"fixed64,1,opt,name=result,proto3" json:"result,omitempty"`
}

func (*AddResponse) Descriptor

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

func (*AddResponse) Equal

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

func (*AddResponse) GetResult

func (m *AddResponse) GetResult() float64

func (*AddResponse) GoString

func (this *AddResponse) GoString() string

func (*AddResponse) Marshal

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

func (*AddResponse) MarshalTo

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

func (*AddResponse) MarshalToSizedBuffer

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

func (*AddResponse) ProtoMessage

func (*AddResponse) ProtoMessage()

func (*AddResponse) Reset

func (m *AddResponse) Reset()

func (*AddResponse) Size

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

func (*AddResponse) String

func (this *AddResponse) String() string

func (*AddResponse) Unmarshal

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

func (*AddResponse) XXX_DiscardUnknown

func (m *AddResponse) XXX_DiscardUnknown()

func (*AddResponse) XXX_Marshal

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

func (*AddResponse) XXX_Merge

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

func (*AddResponse) XXX_Size

func (m *AddResponse) XXX_Size() int

func (*AddResponse) XXX_Unmarshal

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

type Hello

type Hello interface {
	Init(id string)
	Terminate()

	SayHello(*HelloRequest, cluster.GrainContext) (*HelloResponse, error)

	Add(*AddRequest, cluster.GrainContext) (*AddResponse, error)

	VoidFunc(*AddRequest, cluster.GrainContext) (*Unit, error)
}

Hello interfaces the services available to the Hello

type HelloActor

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

HelloActor represents the actor structure

func (*HelloActor) Receive

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

Receive ensures the lifecycle of the actor for the received message

type HelloClient

type HelloClient interface {
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
	Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
	VoidFunc(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*Unit, error)
}

HelloClient is the client API for Hello service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewHelloClient

func NewHelloClient(cc *grpc.ClientConn) HelloClient

type HelloGrain

type HelloGrain struct {
	ID string
}

HelloGrain holds the base data for the HelloGrain

func GetHelloGrain

func GetHelloGrain(id string) *HelloGrain

GetHelloGrain instantiates a new HelloGrain with given ID

func (*HelloGrain) Add

func (g *HelloGrain) Add(r *AddRequest) (*AddResponse, error)

Add requests the execution on to the cluster using default options

func (*HelloGrain) AddChan

func (g *HelloGrain) AddChan(r *AddRequest) (<-chan *AddResponse, <-chan error)

AddChan allows to use a channel to execute the method using default options

func (*HelloGrain) AddChanWithOpts

func (g *HelloGrain) AddChanWithOpts(r *AddRequest, opts *cluster.GrainCallOptions) (<-chan *AddResponse, <-chan error)

AddChanWithOpts allows to use a channel to execute the method

func (*HelloGrain) AddWithOpts

func (g *HelloGrain) AddWithOpts(r *AddRequest, opts *cluster.GrainCallOptions) (*AddResponse, error)

AddWithOpts requests the execution on to the cluster

func (*HelloGrain) SayHello

func (g *HelloGrain) SayHello(r *HelloRequest) (*HelloResponse, error)

SayHello requests the execution on to the cluster using default options

func (*HelloGrain) SayHelloChan

func (g *HelloGrain) SayHelloChan(r *HelloRequest) (<-chan *HelloResponse, <-chan error)

SayHelloChan allows to use a channel to execute the method using default options

func (*HelloGrain) SayHelloChanWithOpts

func (g *HelloGrain) SayHelloChanWithOpts(r *HelloRequest, opts *cluster.GrainCallOptions) (<-chan *HelloResponse, <-chan error)

SayHelloChanWithOpts allows to use a channel to execute the method

func (*HelloGrain) SayHelloWithOpts

func (g *HelloGrain) SayHelloWithOpts(r *HelloRequest, opts *cluster.GrainCallOptions) (*HelloResponse, error)

SayHelloWithOpts requests the execution on to the cluster

func (*HelloGrain) VoidFunc

func (g *HelloGrain) VoidFunc(r *AddRequest) (*Unit, error)

VoidFunc requests the execution on to the cluster using default options

func (*HelloGrain) VoidFuncChan

func (g *HelloGrain) VoidFuncChan(r *AddRequest) (<-chan *Unit, <-chan error)

VoidFuncChan allows to use a channel to execute the method using default options

func (*HelloGrain) VoidFuncChanWithOpts

func (g *HelloGrain) VoidFuncChanWithOpts(r *AddRequest, opts *cluster.GrainCallOptions) (<-chan *Unit, <-chan error)

VoidFuncChanWithOpts allows to use a channel to execute the method

func (*HelloGrain) VoidFuncWithOpts

func (g *HelloGrain) VoidFuncWithOpts(r *AddRequest, opts *cluster.GrainCallOptions) (*Unit, error)

VoidFuncWithOpts requests the execution on to the cluster

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (*HelloRequest) Descriptor

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

func (*HelloRequest) Equal

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

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) GoString

func (this *HelloRequest) GoString() string

func (*HelloRequest) Marshal

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

func (*HelloRequest) MarshalTo

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

func (*HelloRequest) MarshalToSizedBuffer

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

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) Size

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

func (*HelloRequest) String

func (this *HelloRequest) String() string

func (*HelloRequest) Unmarshal

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

func (*HelloRequest) XXX_DiscardUnknown

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal

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

func (*HelloRequest) XXX_Merge

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

func (*HelloRequest) XXX_Size

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal

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

type HelloResponse

type HelloResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

func (*HelloResponse) Descriptor

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

func (*HelloResponse) Equal

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

func (*HelloResponse) GetMessage

func (m *HelloResponse) GetMessage() string

func (*HelloResponse) GoString

func (this *HelloResponse) GoString() string

func (*HelloResponse) Marshal

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

func (*HelloResponse) MarshalTo

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

func (*HelloResponse) MarshalToSizedBuffer

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

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) Reset

func (m *HelloResponse) Reset()

func (*HelloResponse) Size

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

func (*HelloResponse) String

func (this *HelloResponse) String() string

func (*HelloResponse) Unmarshal

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

func (*HelloResponse) XXX_DiscardUnknown

func (m *HelloResponse) XXX_DiscardUnknown()

func (*HelloResponse) XXX_Marshal

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

func (*HelloResponse) XXX_Merge

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

func (*HelloResponse) XXX_Size

func (m *HelloResponse) XXX_Size() int

func (*HelloResponse) XXX_Unmarshal

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

type HelloServer

type HelloServer interface {
	SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
	Add(context.Context, *AddRequest) (*AddResponse, error)
	VoidFunc(context.Context, *AddRequest) (*Unit, error)
}

HelloServer is the server API for Hello service.

type UnimplementedHelloServer

type UnimplementedHelloServer struct {
}

UnimplementedHelloServer can be embedded to have forward compatible implementations.

func (*UnimplementedHelloServer) Add

func (*UnimplementedHelloServer) SayHello

func (*UnimplementedHelloServer) VoidFunc

func (*UnimplementedHelloServer) VoidFunc(ctx context.Context, req *AddRequest) (*Unit, error)

type Unit

type Unit struct {
}

func (*Unit) Descriptor

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

func (*Unit) Equal

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

func (*Unit) GoString

func (this *Unit) GoString() string

func (*Unit) Marshal

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

func (*Unit) MarshalTo

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

func (*Unit) MarshalToSizedBuffer

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

func (*Unit) ProtoMessage

func (*Unit) ProtoMessage()

func (*Unit) Reset

func (m *Unit) Reset()

func (*Unit) Size

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

func (*Unit) String

func (this *Unit) String() string

func (*Unit) Unmarshal

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

func (*Unit) XXX_DiscardUnknown

func (m *Unit) XXX_DiscardUnknown()

func (*Unit) XXX_Marshal

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

func (*Unit) XXX_Merge

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

func (*Unit) XXX_Size

func (m *Unit) XXX_Size() int

func (*Unit) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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