{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package channel\n\nPackage channel provides functionality for managing task communication channels, including inbound and outbound channel configuration and message routing.\n\n## Constants\n\n```go\nconst (\n\tPUSH = ChannelType(\"push\")\n\tPULL = ChannelType(\"pull\")\n\tPUB  = ChannelType(\"pub\")\n\tSUB  = ChannelType(\"sub\")\n)\n```\n\n```go\nconst (\n\tDEFAULT = TransportType(\"default\")\n\tZEROMQ  = TransportType(\"zeromq\")\n\tNANOMSG = TransportType(\"nanomsg\")\n\tSHMEM   = TransportType(\"shmem\")\n)\n```\n\n```go\nconst (\n\tTCP = AddressFormat(\"tcp\")\n\tIPC = AddressFormat(\"ipc\")\n)\n```\n\n```go\nconst IPC_PATH_FORMAT = \"@o2ipc-%s\"\n```\n\n## Functions\n\n```go\nfunc EndpointEquals(e Endpoint, f Endpoint) bool\n```\n\n## Types\n\n```go\ntype AddressFormat string\n```\n\n```go\nfunc (af AddressFormat) String() string\n```\n\n```go\nfunc (af *AddressFormat) UnmarshalText(b []byte) error\n```\n\n```go\ntype BindMap map[string]Endpoint\n```\n\n```go\ntype Channel struct {\n\tName        string        `yaml:\"name\"`\n\tType        ChannelType   `yaml:\"type\"`\n\tSndBufSize  int           `yaml:\"sndBufSize\"`\n\tRcvBufSize  int           `yaml:\"rcvBufSize\"`\n\tRateLogging string        `yaml:\"rateLogging\"` //actually an int but we allow templating\n\tTransport   TransportType `yaml:\"transport\"`   //default: default\n\tTarget      string        `yaml:\"target\"`      //default: empty\n\n}\n```\n\n```go\nfunc (c *Channel) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype ChannelType string\n```\nTODO: FairMQ has the following channel types: push/pull/pub/sub/spub/xsub/pair/req/rep/dealer/router Do we need to support them all?\n\n```go\nfunc (ct ChannelType) String() string\n```\n\n```go\nfunc (ct *ChannelType) UnmarshalText(b []byte) error\n```\n\n```go\ntype Endpoint interface {\n\tGetAddressFormat() AddressFormat\n\tGetAddress() string\n\tGetTransport() TransportType\n\tToTargetEndpoint(taskHostname string) Endpoint\n\tToBoundEndpoint() Endpoint\n}\n```\n\n```go\nfunc NewBoundIpcEndpoint(transport TransportType) Endpoint\n```\n\n```go\nfunc NewBoundTcpEndpoint(port uint64, transport TransportType) Endpoint\n```\n\n```go\nfunc NewIpcEndpoint(path string, transport TransportType) Endpoint\n```\n\n```go\nfunc NewTcpEndpoint(host string, port uint64, transport TransportType) Endpoint\n```\n\n```go\ntype Inbound struct {\n\tChannel\n\tGlobal     string        `yaml:\"global\"`\n\tAddressing AddressFormat `yaml:\"addressing\"` //default: tcp\n\n}\n```\n\n```go\nfunc MergeInbound(hp, lp []Inbound) (channels []Inbound)\n```\n\n```go\nfunc (inbound Inbound) MarshalYAML() (interface{}, error)\n```\n\n```go\nfunc (inbound *Inbound) ToFMQMap(bindMap BindMap) (pm controlcommands.PropertyMap, err error)\n```\n\n```go\nfunc (inbound *Inbound) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype IpcEndpoint struct {\n\tPath      string\n\tTransport TransportType\n}\n```\n\n```go\nfunc (t IpcEndpoint) GetAddress() string\n```\n\n```go\nfunc (IpcEndpoint) GetAddressFormat() AddressFormat\n```\n\n```go\nfunc (t IpcEndpoint) GetTransport() TransportType\n```\n\n```go\nfunc (t IpcEndpoint) ToBoundEndpoint() Endpoint\n```\n\n```go\nfunc (t IpcEndpoint) ToTargetEndpoint(_ string) Endpoint\n```\n\n```go\ntype Outbound struct {\n\tChannel\n}\n```\n\n```go\nfunc MergeOutbound(hp, lp []Outbound) (channels []Outbound)\n```\n\n```go\nfunc (outbound Outbound) MarshalYAML() (interface{}, error)\n```\n\n```go\nfunc (outbound *Outbound) ToFMQMap(bindMap BindMap) (pm controlcommands.PropertyMap, err error)\n```\n\n```go\nfunc (outbound *Outbound) UnmarshalYAML(unmarshal func(interface{}) error) (err error)\n```\n\n```go\ntype TcpEndpoint struct {\n\tHost      string\n\tPort      uint64\n\tTransport TransportType\n}\n```\n\n```go\nfunc (t TcpEndpoint) GetAddress() string\n```\n\n```go\nfunc (TcpEndpoint) GetAddressFormat() AddressFormat\n```\n\n```go\nfunc (t TcpEndpoint) GetTransport() TransportType\n```\n\n```go\nfunc (t TcpEndpoint) ToBoundEndpoint() Endpoint\n```\n\n```go\nfunc (t TcpEndpoint) ToTargetEndpoint(taskHostname string) Endpoint\n```\n\n```go\ntype TransportType string\n```\n\n```go\nfunc (tr TransportType) String() string\n```\n\n```go\nfunc (tr *TransportType) UnmarshalText(b []byte) error\n```\n\n","path":"github.com/AliceO2Group/Control/core/task/channel","name":"channel","synopsis":"Package channel provides functionality for managing task communication channels, including inbound and outbound channel configuration and message routing.","isRedistributable":true}
