Documentation
¶
Overview ¶
Package libatbus_channel_utility provides channel address utilities for libatbus. It provides functions to parse, construct and validate channel addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDuplexAddress ¶
IsDuplexAddress checks if the address is a duplex (bidirectional) address. Duplex addresses are those that are not simplex addresses.
func IsLocalHostAddress ¶
IsLocalHostAddress checks if the address refers to the local host. Local host addresses include: mem:, shm:, unix:, pipe:, atcp://127.0.0.1, atcp://::1, ipv4://127.0.0.1, ipv6://::1
func IsLocalProcessAddress ¶
IsLocalProcessAddress checks if the address is a local process address. Local process addresses include: mem:
func IsSimplexAddress ¶
IsSimplexAddress checks if the address is a simplex (unidirectional) address. Simplex addresses include: mem:, shm:
Types ¶
type ChannelAddress ¶
type ChannelAddress struct {
Address string // Full address string (e.g., "tcp://127.0.0.1:8080")
Scheme string // Protocol scheme (e.g., "tcp", "unix", "shm")
Host string // Host part of the address
Port int // Port number (0 if not specified)
}
ChannelAddress represents a parsed channel address with scheme, host, port and full address.
func MakeAddress ¶
func MakeAddress(in string) (*ChannelAddress, bool)
MakeAddress parses an address string and populates the ChannelAddress struct. Returns true if parsing succeeded, false otherwise. Address format: scheme://host[:port]
func MakeAddressFromComponents ¶
func MakeAddressFromComponents(scheme, host string, port int) *ChannelAddress
MakeAddressFromComponents constructs a ChannelAddress from individual components.
func (*ChannelAddress) GetAddress ¶
func (c *ChannelAddress) GetAddress() string
func (*ChannelAddress) GetHost ¶
func (c *ChannelAddress) GetHost() string
func (*ChannelAddress) GetPort ¶
func (c *ChannelAddress) GetPort() int
func (*ChannelAddress) GetScheme ¶
func (c *ChannelAddress) GetScheme() string