address

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	*goaktpb.Address
}

func From

func From(addr *goaktpb.Address) *Address

From creates an instance of Address provided the serializable address instance

func New

func New(name, system string, host string, port int) *Address

New creates an instance of Address

func NoSender

func NoSender() *Address

NoSender creates an instance of Address with default values.

func (*Address) Equals

func (a *Address) Equals(x *Address) bool

Equals is used to compare two addresses

func (*Address) Host

func (a *Address) Host() string

Host returns the host

func (*Address) HostPort

func (a *Address) HostPort() string

HostPort returns the host and port in the following string format @host:port

func (*Address) ID

func (a *Address) ID() string

ID returns actor ID

func (*Address) MarshalBinary

func (a *Address) MarshalBinary() (data []byte, err error)

MarshalBinary encodes the receiver into a binary form and returns the result.

func (*Address) Name

func (a *Address) Name() string

Name returns the name

func (*Address) Parent

func (a *Address) Parent() *Address

Parent returns the parent path

func (*Address) Port

func (a *Address) Port() int

Port returns the port number

func (*Address) String

func (a *Address) String() string

String returns the canonical String representation of this Address formatted as: `protocol://system@host:port/name`

func (*Address) System

func (a *Address) System() string

System returns the actor system name

func (*Address) UnmarshalBinary

func (a *Address) UnmarshalBinary(data []byte) error

UnmarshalBinary must be able to decode the form generated by MarshalBinary. UnmarshalBinary must copy the data if it wishes to retain the data after returning.

func (*Address) Validate

func (a *Address) Validate() error

Validate returns an error when the address is not valid

func (*Address) WithHost

func (a *Address) WithHost(host string) *Address

WithHost sets the hosts of a given Address and returns the instance of the address

func (*Address) WithName

func (a *Address) WithName(name string) *Address

WithName sets the name of a given Address and returns the instance of the address

func (*Address) WithParent

func (a *Address) WithParent(parent *Address) *Address

WithParent sets the parent of a given Address and returns the instance of the address

func (*Address) WithPort

func (a *Address) WithPort(port int) *Address

WithPort sets the port of a given Address and returns the instance of the address

func (*Address) WithSystem

func (a *Address) WithSystem(system string) *Address

WithSystem sets the actor system of a given Address and returns the instance of the address

Jump to

Keyboard shortcuts

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