msg

package
v0.0.0-...-3dd0de1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageType_name = map[int32]string{
		0: "CREATED",
		1: "SPAWN",
		2: "SPAWNED",
		3: "RUN",
		4: "SUBSCRIBE",
		5: "UNSUBSCRIBE",
		6: "LOAD_PLUGIN",
		7: "NOTIFY",
	}
	MessageType_value = map[string]int32{
		"CREATED":     0,
		"SPAWN":       1,
		"SPAWNED":     2,
		"RUN":         3,
		"SUBSCRIBE":   4,
		"UNSUBSCRIBE": 5,
		"LOAD_PLUGIN": 6,
		"NOTIFY":      7,
	}
)

Enum value maps for MessageType.

View Source
var File_protocol_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Created

type Created struct {
	Remotes []*RemoteAddress `protobuf:"bytes,1,rep,name=remotes,proto3" json:"remotes,omitempty"`
	Peers   []*actor.PID     `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

Protocol message

func NewCreated

func NewCreated(remotes []*RemoteAddress, peers []*actor.PID) *Created

func (*Created) Descriptor deprecated

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

Deprecated: Use Created.ProtoReflect.Descriptor instead.

func (*Created) GetPeers

func (x *Created) GetPeers() []*actor.PID

func (*Created) GetRemotes

func (x *Created) GetRemotes() []*RemoteAddress

func (*Created) ProtoMessage

func (*Created) ProtoMessage()

func (*Created) ProtoReflect

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

func (*Created) Reset

func (x *Created) Reset()

func (*Created) String

func (x *Created) String() string

type LoadPlugin

type LoadPlugin struct {
	Plugin *PluginIdentifier `protobuf:"bytes,1,opt,name=Plugin,proto3" json:"Plugin,omitempty"`
	// contains filtered or unexported fields
}

func NewLoadPlugin

func NewLoadPlugin(plugin *PluginIdentifier) *LoadPlugin

func (*LoadPlugin) Descriptor deprecated

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

Deprecated: Use LoadPlugin.ProtoReflect.Descriptor instead.

func (*LoadPlugin) GetPlugin

func (x *LoadPlugin) GetPlugin() *PluginIdentifier

func (*LoadPlugin) ProtoMessage

func (*LoadPlugin) ProtoMessage()

func (*LoadPlugin) ProtoReflect

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

func (*LoadPlugin) Reset

func (x *LoadPlugin) Reset()

func (*LoadPlugin) String

func (x *LoadPlugin) String() string

type MessageType

type MessageType int32
const (
	MessageType_CREATED     MessageType = 0
	MessageType_SPAWN       MessageType = 1
	MessageType_SPAWNED     MessageType = 2
	MessageType_RUN         MessageType = 3
	MessageType_SUBSCRIBE   MessageType = 4
	MessageType_UNSUBSCRIBE MessageType = 5
	MessageType_LOAD_PLUGIN MessageType = 6
	MessageType_NOTIFY      MessageType = 7
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

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

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

type Notify

type Notify struct {
	Source      *actor.PID  `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"`
	MessageType MessageType `protobuf:"varint,2,opt,name=MessageType,proto3,enum=messages.MessageType" json:"MessageType,omitempty"`
	// contains filtered or unexported fields
}

func NewNotify

func NewNotify(source *actor.PID, messageType MessageType) *Notify

func (*Notify) Descriptor deprecated

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

Deprecated: Use Notify.ProtoReflect.Descriptor instead.

func (*Notify) GetMessageType

func (x *Notify) GetMessageType() MessageType

func (*Notify) GetSource

func (x *Notify) GetSource() *actor.PID

func (*Notify) ProtoMessage

func (*Notify) ProtoMessage()

func (*Notify) ProtoReflect

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

func (*Notify) Reset

func (x *Notify) Reset()

func (*Notify) String

func (x *Notify) String() string

type PluginIdentifier

type PluginIdentifier struct {
	Name    string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=Version,proto3" json:"Version,omitempty"`
	// contains filtered or unexported fields
}

func NewPluginIdentifier

func NewPluginIdentifier(name, version string) *PluginIdentifier

func (*PluginIdentifier) Descriptor deprecated

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

Deprecated: Use PluginIdentifier.ProtoReflect.Descriptor instead.

func (*PluginIdentifier) GetName

func (x *PluginIdentifier) GetName() string

func (*PluginIdentifier) GetVersion

func (x *PluginIdentifier) GetVersion() string

func (*PluginIdentifier) ProtoMessage

func (*PluginIdentifier) ProtoMessage()

func (*PluginIdentifier) ProtoReflect

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

func (*PluginIdentifier) Reset

func (x *PluginIdentifier) Reset()

func (*PluginIdentifier) String

func (x *PluginIdentifier) String() string

type RemoteAddress

type RemoteAddress struct {
	Hostname string `protobuf:"bytes,1,opt,name=Hostname,proto3" json:"Hostname,omitempty"`
	Port     int32  `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
	// contains filtered or unexported fields
}

Models

func NewRemoteAddress

func NewRemoteAddress(hostname string, port int) *RemoteAddress

func (*RemoteAddress) Descriptor deprecated

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

Deprecated: Use RemoteAddress.ProtoReflect.Descriptor instead.

func (*RemoteAddress) GetHostname

func (x *RemoteAddress) GetHostname() string

func (*RemoteAddress) GetPort

func (x *RemoteAddress) GetPort() int32

func (*RemoteAddress) ProtoMessage

func (*RemoteAddress) ProtoMessage()

func (*RemoteAddress) ProtoReflect

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

func (*RemoteAddress) Reset

func (x *RemoteAddress) Reset()

func (*RemoteAddress) String

func (x *RemoteAddress) String() string

type Spawn

type Spawn struct {
	Host *RemoteAddress `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
	// contains filtered or unexported fields
}

func NewSpawn

func NewSpawn(host *RemoteAddress) *Spawn

func (*Spawn) Descriptor deprecated

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

Deprecated: Use Spawn.ProtoReflect.Descriptor instead.

func (*Spawn) GetHost

func (x *Spawn) GetHost() *RemoteAddress

func (*Spawn) ProtoMessage

func (*Spawn) ProtoMessage()

func (*Spawn) ProtoReflect

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

func (*Spawn) Reset

func (x *Spawn) Reset()

func (*Spawn) String

func (x *Spawn) String() string

type Spawned

type Spawned struct {
	Bot *actor.PID `protobuf:"bytes,1,opt,name=Bot,proto3" json:"Bot,omitempty"`
	// contains filtered or unexported fields
}

func NewSpawned

func NewSpawned(bot *actor.PID) *Spawned

func (*Spawned) Descriptor deprecated

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

Deprecated: Use Spawned.ProtoReflect.Descriptor instead.

func (*Spawned) GetBot

func (x *Spawned) GetBot() *actor.PID

func (*Spawned) ProtoMessage

func (*Spawned) ProtoMessage()

func (*Spawned) ProtoReflect

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

func (*Spawned) Reset

func (x *Spawned) Reset()

func (*Spawned) String

func (x *Spawned) String() string

type Subscribe

type Subscribe struct {
	Subscriber   *actor.PID    `protobuf:"bytes,1,opt,name=Subscriber,proto3" json:"Subscriber,omitempty"`
	MessageTypes []MessageType `protobuf:"varint,2,rep,packed,name=MessageTypes,proto3,enum=messages.MessageType" json:"MessageTypes,omitempty"`
	// contains filtered or unexported fields
}

func NewSubscribe

func NewSubscribe(subscriber *actor.PID, messageTypes ...MessageType) *Subscribe

func (*Subscribe) Descriptor deprecated

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

Deprecated: Use Subscribe.ProtoReflect.Descriptor instead.

func (*Subscribe) GetMessageTypes

func (x *Subscribe) GetMessageTypes() []MessageType

func (*Subscribe) GetSubscriber

func (x *Subscribe) GetSubscriber() *actor.PID

func (*Subscribe) ProtoMessage

func (*Subscribe) ProtoMessage()

func (*Subscribe) ProtoReflect

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

func (*Subscribe) Reset

func (x *Subscribe) Reset()

func (*Subscribe) String

func (x *Subscribe) String() string

type UnloadPlugin

type UnloadPlugin struct {
	Plugin *PluginIdentifier `protobuf:"bytes,1,opt,name=Plugin,proto3" json:"Plugin,omitempty"`
	// contains filtered or unexported fields
}

func NewUnloadPlugin

func NewUnloadPlugin(plugin *PluginIdentifier) *UnloadPlugin

func (*UnloadPlugin) Descriptor deprecated

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

Deprecated: Use UnloadPlugin.ProtoReflect.Descriptor instead.

func (*UnloadPlugin) GetPlugin

func (x *UnloadPlugin) GetPlugin() *PluginIdentifier

func (*UnloadPlugin) ProtoMessage

func (*UnloadPlugin) ProtoMessage()

func (*UnloadPlugin) ProtoReflect

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

func (*UnloadPlugin) Reset

func (x *UnloadPlugin) Reset()

func (*UnloadPlugin) String

func (x *UnloadPlugin) String() string

type Unsubscribe

type Unsubscribe struct {
	Unsubscriber *actor.PID    `protobuf:"bytes,1,opt,name=Unsubscriber,proto3" json:"Unsubscriber,omitempty"`
	MessageTypes []MessageType `protobuf:"varint,2,rep,packed,name=MessageTypes,proto3,enum=messages.MessageType" json:"MessageTypes,omitempty"`
	// contains filtered or unexported fields
}

func NewUnsubscribe

func NewUnsubscribe(unsubscriber *actor.PID, messageTypes ...MessageType) *Unsubscribe

func (*Unsubscribe) Descriptor deprecated

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

Deprecated: Use Unsubscribe.ProtoReflect.Descriptor instead.

func (*Unsubscribe) GetMessageTypes

func (x *Unsubscribe) GetMessageTypes() []MessageType

func (*Unsubscribe) GetUnsubscriber

func (x *Unsubscribe) GetUnsubscriber() *actor.PID

func (*Unsubscribe) ProtoMessage

func (*Unsubscribe) ProtoMessage()

func (*Unsubscribe) ProtoReflect

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

func (*Unsubscribe) Reset

func (x *Unsubscribe) Reset()

func (*Unsubscribe) String

func (x *Unsubscribe) String() string

Jump to

Keyboard shortcuts

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