libatbus_channel_utility

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 3 Imported by: 0

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

func IsDuplexAddress(in string) bool

IsDuplexAddress checks if the address is a duplex (bidirectional) address. Duplex addresses are those that are not simplex addresses.

func IsLocalHostAddress

func IsLocalHostAddress(in string) bool

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

func IsLocalProcessAddress(in string) bool

IsLocalProcessAddress checks if the address is a local process address. Local process addresses include: mem:

func IsSimplexAddress

func IsSimplexAddress(in string) bool

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

Jump to

Keyboard shortcuts

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