goaktv1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DiscoveryProvider_name = map[int32]string{
		0: "DISCOVERY_PROVIDER_UNSPECIFIED",
		1: "DISCOVERY_PROVIDER_LOCAL",
		2: "DISCOVERY_PROVIDER_K8",
		3: "DISCOVERY_PROVIDER_MDNS",
	}
	DiscoveryProvider_value = map[string]int32{
		"DISCOVERY_PROVIDER_UNSPECIFIED": 0,
		"DISCOVERY_PROVIDER_LOCAL":       1,
		"DISCOVERY_PROVIDER_K8":          2,
		"DISCOVERY_PROVIDER_MDNS":        3,
	}
)

Enum value maps for DiscoveryProvider.

View Source
var File_goakt_v1_cluster_proto protoreflect.FileDescriptor
View Source
var File_goakt_v1_discovery_proto protoreflect.FileDescriptor
View Source
var File_goakt_v1_remoting_proto protoreflect.FileDescriptor
View Source
var RemoteMessagingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "goakt.v1.RemoteMessagingService",
	HandlerType: (*RemoteMessagingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RemoteAsk",
			Handler:    _RemoteMessagingService_RemoteAsk_Handler,
		},
		{
			MethodName: "RemoteTell",
			Handler:    _RemoteMessagingService_RemoteTell_Handler,
		},
		{
			MethodName: "RemoteLookup",
			Handler:    _RemoteMessagingService_RemoteLookup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "goakt/v1/remoting.proto",
}

RemoteMessagingService_ServiceDesc is the grpc.ServiceDesc for RemoteMessagingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRemoteMessagingServiceServer

func RegisterRemoteMessagingServiceServer(s grpc.ServiceRegistrar, srv RemoteMessagingServiceServer)

Types

type DiscoveryProvider

type DiscoveryProvider int32
const (
	// Specifies that there is no discovery provider
	DiscoveryProvider_DISCOVERY_PROVIDER_UNSPECIFIED DiscoveryProvider = 0
	// Specifies that the discovery provider is local
	DiscoveryProvider_DISCOVERY_PROVIDER_LOCAL DiscoveryProvider = 1
	// Specifies that the discovery provider is kubernetes
	DiscoveryProvider_DISCOVERY_PROVIDER_K8 DiscoveryProvider = 2
	// Specifies that the discovery provider is mDNS
	DiscoveryProvider_DISCOVERY_PROVIDER_MDNS DiscoveryProvider = 3
)

func (DiscoveryProvider) Descriptor

func (DiscoveryProvider) Enum

func (DiscoveryProvider) EnumDescriptor deprecated

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

Deprecated: Use DiscoveryProvider.Descriptor instead.

func (DiscoveryProvider) Number

func (DiscoveryProvider) String

func (x DiscoveryProvider) String() string

func (DiscoveryProvider) Type

type Event

type Event struct {

	// Specifies the type of event
	//
	// Types that are assignable to Type:
	//
	//	*Event_Added
	//	*Event_Removed
	//	*Event_Modified
	Type isEvent_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

Event specifies the various types of events emitted by the discovery engine

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAdded

func (x *Event) GetAdded() *NodeAdded

func (*Event) GetModified

func (x *Event) GetModified() *NodeModified

func (*Event) GetRemoved

func (x *Event) GetRemoved() *NodeRemoved

func (*Event) GetType

func (m *Event) GetType() isEvent_Type

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Event_Added

type Event_Added struct {
	// Specifies the node added event type
	Added *NodeAdded `protobuf:"bytes,1,opt,name=added,proto3,oneof"`
}

type Event_Modified

type Event_Modified struct {
	// Specifies the node modified event type
	Modified *NodeModified `protobuf:"bytes,4,opt,name=modified,proto3,oneof"`
}

type Event_Removed

type Event_Removed struct {
	// Specifies the node removed event type
	Removed *NodeRemoved `protobuf:"bytes,3,opt,name=removed,proto3,oneof"`
}

type FsmState

type FsmState struct {

	// Specifies raft FSM entries
	Actors map[string]*WireActor `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

FsmState specifies the raft Finite State Machine entries

func (*FsmState) Descriptor deprecated

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

Deprecated: Use FsmState.ProtoReflect.Descriptor instead.

func (*FsmState) GetActors

func (x *FsmState) GetActors() map[string]*WireActor

func (*FsmState) ProtoMessage

func (*FsmState) ProtoMessage()

func (*FsmState) ProtoReflect

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

func (*FsmState) Reset

func (x *FsmState) Reset()

func (*FsmState) String

func (x *FsmState) String() string

type GetWireActor

type GetWireActor struct {

	// Specifies the actor name
	ActorName string `protobuf:"bytes,2,opt,name=actor_name,json=actorName,proto3" json:"actor_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWireActor) Descriptor deprecated

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

Deprecated: Use GetWireActor.ProtoReflect.Descriptor instead.

func (*GetWireActor) GetActorName

func (x *GetWireActor) GetActorName() string

func (*GetWireActor) ProtoMessage

func (*GetWireActor) ProtoMessage()

func (*GetWireActor) ProtoReflect

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

func (*GetWireActor) Reset

func (x *GetWireActor) Reset()

func (*GetWireActor) String

func (x *GetWireActor) String() string

type Node

type Node struct {

	// Specifies the node unique identifier
	// It is uuid v4 that is auto-generated
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Specifies the node name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies the node host name
	Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	// Specifies the node port
	Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	// Specifies the timestamp the node has been registered
	// The timestamp is expressed in UNIX time
	Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Specifies additional meta info about the node
	// This is optional but can be useful when one want to pass a node information to other nodes
	Meta map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Node stores all the information about a Node

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetHost

func (x *Node) GetHost() string

func (*Node) GetMeta

func (x *Node) GetMeta() map[string]string

func (*Node) GetName

func (x *Node) GetName() string

func (*Node) GetPort

func (x *Node) GetPort() int32

func (*Node) GetTimestamp

func (x *Node) GetTimestamp() int64

func (*Node) GetUuid

func (x *Node) GetUuid() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type NodeAdded

type NodeAdded struct {

	// Specifies the node
	Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

NodeAdded is event that a given node is added

func (*NodeAdded) Descriptor deprecated

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

Deprecated: Use NodeAdded.ProtoReflect.Descriptor instead.

func (*NodeAdded) GetNode

func (x *NodeAdded) GetNode() *Node

func (*NodeAdded) ProtoMessage

func (*NodeAdded) ProtoMessage()

func (*NodeAdded) ProtoReflect

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

func (*NodeAdded) Reset

func (x *NodeAdded) Reset()

func (*NodeAdded) String

func (x *NodeAdded) String() string

type NodeModified

type NodeModified struct {

	// Specifies the old node
	OldNode *Node `protobuf:"bytes,1,opt,name=old_node,json=oldNode,proto3" json:"old_node,omitempty"`
	// Specifies the node
	NewNode *Node `protobuf:"bytes,2,opt,name=new_node,json=newNode,proto3" json:"new_node,omitempty"`
	// contains filtered or unexported fields
}

NodeModified event is emitted when a node is modified

func (*NodeModified) Descriptor deprecated

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

Deprecated: Use NodeModified.ProtoReflect.Descriptor instead.

func (*NodeModified) GetNewNode

func (x *NodeModified) GetNewNode() *Node

func (*NodeModified) GetOldNode

func (x *NodeModified) GetOldNode() *Node

func (*NodeModified) ProtoMessage

func (*NodeModified) ProtoMessage()

func (*NodeModified) ProtoReflect

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

func (*NodeModified) Reset

func (x *NodeModified) Reset()

func (*NodeModified) String

func (x *NodeModified) String() string

type NodeRemoved

type NodeRemoved struct {

	// Specifies the node
	Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

NodeRemoved event is emitted when a node is automatically removed from the discovery engine.

func (*NodeRemoved) Descriptor deprecated

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

Deprecated: Use NodeRemoved.ProtoReflect.Descriptor instead.

func (*NodeRemoved) GetNode

func (x *NodeRemoved) GetNode() *Node

func (*NodeRemoved) ProtoMessage

func (*NodeRemoved) ProtoMessage()

func (*NodeRemoved) ProtoReflect

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

func (*NodeRemoved) Reset

func (x *NodeRemoved) Reset()

func (*NodeRemoved) String

func (x *NodeRemoved) String() string

type Peer

type Peer struct {

	// Specifies the peer unique id
	NodeId uint64 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// Specifies the peer host and port
	HostAndPort string `protobuf:"bytes,2,opt,name=host_and_port,json=hostAndPort,proto3" json:"host_and_port,omitempty"`
	// contains filtered or unexported fields
}

Peer specifies the node peer settings

func (*Peer) Descriptor deprecated

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetHostAndPort

func (x *Peer) GetHostAndPort() string

func (*Peer) GetNodeId

func (x *Peer) GetNodeId() uint64

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect

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

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

type PutWireActor

type PutWireActor struct {

	// Specifies the wire actor
	WireActor *WireActor `protobuf:"bytes,1,opt,name=wire_actor,json=wireActor,proto3" json:"wire_actor,omitempty"`
	// contains filtered or unexported fields
}

func (*PutWireActor) Descriptor deprecated

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

Deprecated: Use PutWireActor.ProtoReflect.Descriptor instead.

func (*PutWireActor) GetWireActor

func (x *PutWireActor) GetWireActor() *WireActor

func (*PutWireActor) ProtoMessage

func (*PutWireActor) ProtoMessage()

func (*PutWireActor) ProtoReflect

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

func (*PutWireActor) Reset

func (x *PutWireActor) Reset()

func (*PutWireActor) String

func (x *PutWireActor) String() string

type RemoteAskRequest

type RemoteAskRequest struct {

	// Specifies the receiver' address
	Receiver *v1.Address `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Specifies the message to send to the actor
	// Any proto message is allowed to be sent
	Message *anypb.Any `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

RemoteAsk is used to send a message to an actor remotely and expect a response immediately. With this type of message the receiver cannot communicate back to Sender except reply the message with a response. This one-way communication

func (*RemoteAskRequest) Descriptor deprecated

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

Deprecated: Use RemoteAskRequest.ProtoReflect.Descriptor instead.

func (*RemoteAskRequest) GetMessage

func (x *RemoteAskRequest) GetMessage() *anypb.Any

func (*RemoteAskRequest) GetReceiver

func (x *RemoteAskRequest) GetReceiver() *v1.Address

func (*RemoteAskRequest) ProtoMessage

func (*RemoteAskRequest) ProtoMessage()

func (*RemoteAskRequest) ProtoReflect

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

func (*RemoteAskRequest) Reset

func (x *RemoteAskRequest) Reset()

func (*RemoteAskRequest) String

func (x *RemoteAskRequest) String() string

type RemoteAskResponse

type RemoteAskResponse struct {

	// Specifies the message to send to the actor
	// Any proto message is allowed to be sent
	Message *anypb.Any `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoteAskResponse) Descriptor deprecated

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

Deprecated: Use RemoteAskResponse.ProtoReflect.Descriptor instead.

func (*RemoteAskResponse) GetMessage

func (x *RemoteAskResponse) GetMessage() *anypb.Any

func (*RemoteAskResponse) ProtoMessage

func (*RemoteAskResponse) ProtoMessage()

func (*RemoteAskResponse) ProtoReflect

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

func (*RemoteAskResponse) Reset

func (x *RemoteAskResponse) Reset()

func (*RemoteAskResponse) String

func (x *RemoteAskResponse) String() string

type RemoteLookupRequest

type RemoteLookupRequest struct {

	// Specifies the remote host address
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Specifies the remote port
	Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// Specifies the actor name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

RemoteLookupRequest checks whether a given actor exists on a remote host

func (*RemoteLookupRequest) Descriptor deprecated

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

Deprecated: Use RemoteLookupRequest.ProtoReflect.Descriptor instead.

func (*RemoteLookupRequest) GetHost

func (x *RemoteLookupRequest) GetHost() string

func (*RemoteLookupRequest) GetName

func (x *RemoteLookupRequest) GetName() string

func (*RemoteLookupRequest) GetPort

func (x *RemoteLookupRequest) GetPort() int32

func (*RemoteLookupRequest) ProtoMessage

func (*RemoteLookupRequest) ProtoMessage()

func (*RemoteLookupRequest) ProtoReflect

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

func (*RemoteLookupRequest) Reset

func (x *RemoteLookupRequest) Reset()

func (*RemoteLookupRequest) String

func (x *RemoteLookupRequest) String() string

type RemoteLookupResponse

type RemoteLookupResponse struct {

	// Specifies the actor address
	Address *v1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoteLookupResponse) Descriptor deprecated

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

Deprecated: Use RemoteLookupResponse.ProtoReflect.Descriptor instead.

func (*RemoteLookupResponse) GetAddress

func (x *RemoteLookupResponse) GetAddress() *v1.Address

func (*RemoteLookupResponse) ProtoMessage

func (*RemoteLookupResponse) ProtoMessage()

func (*RemoteLookupResponse) ProtoReflect

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

func (*RemoteLookupResponse) Reset

func (x *RemoteLookupResponse) Reset()

func (*RemoteLookupResponse) String

func (x *RemoteLookupResponse) String() string

type RemoteMessagingServiceClient

type RemoteMessagingServiceClient interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response
	// immediately. With this type of message the receiver cannot communicate back to Sender
	// except reply the message with a response. This one-way communication
	RemoteAsk(ctx context.Context, in *RemoteAskRequest, opts ...grpc.CallOption) (*RemoteAskResponse, error)
	// RemoteTell is used to send a message to an actor remotely by another actor
	// This is the only way remote actors can interact with each other. The actor on the
	// other line can reply to the sender by using the Sender in the message
	RemoteTell(ctx context.Context, in *RemoteTellRequest, opts ...grpc.CallOption) (*RemoteTellResponse, error)
	// Lookup for an actor on a remote host.
	RemoteLookup(ctx context.Context, in *RemoteLookupRequest, opts ...grpc.CallOption) (*RemoteLookupResponse, error)
}

RemoteMessagingServiceClient is the client API for RemoteMessagingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type RemoteMessagingServiceServer

type RemoteMessagingServiceServer interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response
	// immediately. With this type of message the receiver cannot communicate back to Sender
	// except reply the message with a response. This one-way communication
	RemoteAsk(context.Context, *RemoteAskRequest) (*RemoteAskResponse, error)
	// RemoteTell is used to send a message to an actor remotely by another actor
	// This is the only way remote actors can interact with each other. The actor on the
	// other line can reply to the sender by using the Sender in the message
	RemoteTell(context.Context, *RemoteTellRequest) (*RemoteTellResponse, error)
	// Lookup for an actor on a remote host.
	RemoteLookup(context.Context, *RemoteLookupRequest) (*RemoteLookupResponse, error)
}

RemoteMessagingServiceServer is the server API for RemoteMessagingService service. All implementations should embed UnimplementedRemoteMessagingServiceServer for forward compatibility

type RemoteTellRequest

type RemoteTellRequest struct {
	RemoteMessage *v1.RemoteMessage `protobuf:"bytes,1,opt,name=remote_message,json=remoteMessage,proto3" json:"remote_message,omitempty"`
	// contains filtered or unexported fields
}

RemoteTell is used to send a message to an actor remotely by another actor This is the only way remote actors can interact with each other. The actor on the other line can reply to the sender by using the Sender in the message

func (*RemoteTellRequest) Descriptor deprecated

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

Deprecated: Use RemoteTellRequest.ProtoReflect.Descriptor instead.

func (*RemoteTellRequest) GetRemoteMessage

func (x *RemoteTellRequest) GetRemoteMessage() *v1.RemoteMessage

func (*RemoteTellRequest) ProtoMessage

func (*RemoteTellRequest) ProtoMessage()

func (*RemoteTellRequest) ProtoReflect

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

func (*RemoteTellRequest) Reset

func (x *RemoteTellRequest) Reset()

func (*RemoteTellRequest) String

func (x *RemoteTellRequest) String() string

type RemoteTellResponse

type RemoteTellResponse struct {
	// contains filtered or unexported fields
}

func (*RemoteTellResponse) Descriptor deprecated

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

Deprecated: Use RemoteTellResponse.ProtoReflect.Descriptor instead.

func (*RemoteTellResponse) ProtoMessage

func (*RemoteTellResponse) ProtoMessage()

func (*RemoteTellResponse) ProtoReflect

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

func (*RemoteTellResponse) Reset

func (x *RemoteTellResponse) Reset()

func (*RemoteTellResponse) String

func (x *RemoteTellResponse) String() string

type UnimplementedRemoteMessagingServiceServer

type UnimplementedRemoteMessagingServiceServer struct {
}

UnimplementedRemoteMessagingServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedRemoteMessagingServiceServer) RemoteAsk

func (UnimplementedRemoteMessagingServiceServer) RemoteLookup

func (UnimplementedRemoteMessagingServiceServer) RemoteTell

type UnsafeRemoteMessagingServiceServer

type UnsafeRemoteMessagingServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRemoteMessagingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RemoteMessagingServiceServer will result in compilation errors.

type WireActor

type WireActor struct {

	// Specifies the actor name.
	// The actor name can be either the actor FQN or an alias
	ActorName string `protobuf:"bytes,1,opt,name=actor_name,json=actorName,proto3" json:"actor_name,omitempty"`
	// Specifies the actor address
	ActorAddress *v1.Address `protobuf:"bytes,2,opt,name=actor_address,json=actorAddress,proto3" json:"actor_address,omitempty"`
	// Specifies the actor payload. The payload is used
	// to recreate this actor in case the node hosting the actor is dead and we want to recreate the given actor
	// on another node of the cluster
	ActorPayload []byte `protobuf:"bytes,3,opt,name=actor_payload,json=actorPayload,proto3" json:"actor_payload,omitempty"`
	// contains filtered or unexported fields
}

WireActor represents the actor information on the wire

func (*WireActor) Descriptor deprecated

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

Deprecated: Use WireActor.ProtoReflect.Descriptor instead.

func (*WireActor) GetActorAddress

func (x *WireActor) GetActorAddress() *v1.Address

func (*WireActor) GetActorName

func (x *WireActor) GetActorName() string

func (*WireActor) GetActorPayload

func (x *WireActor) GetActorPayload() []byte

func (*WireActor) ProtoMessage

func (*WireActor) ProtoMessage()

func (*WireActor) ProtoReflect

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

func (*WireActor) Reset

func (x *WireActor) Reset()

func (*WireActor) String

func (x *WireActor) String() string

Jump to

Keyboard shortcuts

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