channel

package
v0.83.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PUSH = ChannelType("push")
	PULL = ChannelType("pull")
	PUB  = ChannelType("pub")
	SUB  = ChannelType("sub")
)
View Source
const (
	DEFAULT = TransportType("default")
	ZEROMQ  = TransportType("zeromq")
	NANOMSG = TransportType("nanomsg")
	SHMEM   = TransportType("shmem")
)
View Source
const (
	TCP = AddressFormat("tcp")
	IPC = AddressFormat("ipc")
)

Variables

This section is empty.

Functions

func EndpointEquals added in v0.23.0

func EndpointEquals(e Endpoint, f Endpoint) bool

Types

type AddressFormat added in v0.13.0

type AddressFormat string

func (AddressFormat) String added in v0.13.0

func (af AddressFormat) String() string

func (*AddressFormat) UnmarshalText added in v0.13.0

func (af *AddressFormat) UnmarshalText(b []byte) error

type BindMap

type BindMap map[string]Endpoint

type Channel added in v0.17.0

type Channel struct {
	Name        string        `yaml:"name"`
	Type        ChannelType   `yaml:"type"`
	SndBufSize  int           `yaml:"sndBufSize"`
	RcvBufSize  int           `yaml:"rcvBufSize"`
	RateLogging string        `yaml:"rateLogging"` //actually an int but we allow templating
	Transport   TransportType `yaml:"transport"`   //default: default
	Target      string        `yaml:"target"`      //default: empty

}

func (*Channel) UnmarshalYAML added in v0.17.0

func (c *Channel) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type ChannelType

type ChannelType string

TODO: FairMQ has the following channel types: push/pull/pub/sub/spub/xsub/pair/req/rep/dealer/router Do we need to support them all?

func (ChannelType) String

func (ct ChannelType) String() string

func (*ChannelType) UnmarshalText

func (ct *ChannelType) UnmarshalText(b []byte) error

type Endpoint

type Endpoint interface {
	GetAddressFormat() AddressFormat
	GetAddress() string
	GetTransport() TransportType
	ToTargetEndpoint(taskHostname string) Endpoint
	ToBoundEndpoint() Endpoint
}

func NewBoundIpcEndpoint added in v0.13.0

func NewBoundIpcEndpoint(transport TransportType) Endpoint

func NewBoundTcpEndpoint added in v0.13.0

func NewBoundTcpEndpoint(port uint64, transport TransportType) Endpoint

func NewIpcEndpoint added in v0.13.0

func NewIpcEndpoint(path string, transport TransportType) Endpoint

func NewTcpEndpoint added in v0.13.0

func NewTcpEndpoint(host string, port uint64, transport TransportType) Endpoint

type Inbound

type Inbound struct {
	Channel
	Global     string        `yaml:"global"`
	Addressing AddressFormat `yaml:"addressing"` //default: tcp

}

func MergeInbound added in v0.13.90

func MergeInbound(hp, lp []Inbound) (channels []Inbound)

func (Inbound) MarshalYAML added in v0.17.0

func (inbound Inbound) MarshalYAML() (interface{}, error)

func (*Inbound) ToFMQMap

func (inbound *Inbound) ToFMQMap(bindMap BindMap) (pm controlcommands.PropertyMap, err error)

func (*Inbound) UnmarshalYAML

func (inbound *Inbound) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type IpcEndpoint added in v0.13.0

type IpcEndpoint struct {
	Path      string
	Transport TransportType
}

func (IpcEndpoint) GetAddress added in v0.13.0

func (t IpcEndpoint) GetAddress() string

func (IpcEndpoint) GetAddressFormat added in v0.13.0

func (IpcEndpoint) GetAddressFormat() AddressFormat

func (IpcEndpoint) GetTransport added in v0.13.0

func (t IpcEndpoint) GetTransport() TransportType

func (IpcEndpoint) ToBoundEndpoint added in v0.13.0

func (t IpcEndpoint) ToBoundEndpoint() Endpoint

func (IpcEndpoint) ToTargetEndpoint added in v0.13.0

func (t IpcEndpoint) ToTargetEndpoint(_ string) Endpoint

type Outbound

type Outbound struct {
	Channel
}

func MergeOutbound added in v0.13.90

func MergeOutbound(hp, lp []Outbound) (channels []Outbound)

func (Outbound) MarshalYAML added in v0.17.0

func (outbound Outbound) MarshalYAML() (interface{}, error)

func (*Outbound) ToFMQMap

func (outbound *Outbound) ToFMQMap(bindMap BindMap) (pm controlcommands.PropertyMap, err error)

func (*Outbound) UnmarshalYAML

func (outbound *Outbound) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type TcpEndpoint added in v0.13.0

type TcpEndpoint struct {
	Host      string
	Port      uint64
	Transport TransportType
}

func (TcpEndpoint) GetAddress added in v0.13.0

func (t TcpEndpoint) GetAddress() string

func (TcpEndpoint) GetAddressFormat added in v0.13.0

func (TcpEndpoint) GetAddressFormat() AddressFormat

func (TcpEndpoint) GetTransport added in v0.13.0

func (t TcpEndpoint) GetTransport() TransportType

func (TcpEndpoint) ToBoundEndpoint added in v0.13.0

func (t TcpEndpoint) ToBoundEndpoint() Endpoint

func (TcpEndpoint) ToTargetEndpoint added in v0.13.0

func (t TcpEndpoint) ToTargetEndpoint(taskHostname string) Endpoint

type TransportType added in v0.13.0

type TransportType string

func (TransportType) String added in v0.13.0

func (tr TransportType) String() string

func (*TransportType) UnmarshalText added in v0.13.0

func (tr *TransportType) UnmarshalText(b []byte) error

Jump to

Keyboard shortcuts

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