endpoint

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeUNIX = "unix"
	SchemeTCP  = "tcp"
)

Schemes supported by COSI.

Variables

View Source
var ErrEmptyAddress = errors.New("address is empty")

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

Endpoint represents COSI Endpoint.

func New

func New(url *url.URL) *Endpoint

New creates a new COSI Endpoint with the specified URL. The URL defines the communication protocol and address for the endpoint.

func (*Endpoint) Close

func (e *Endpoint) Close() error

Close ensures that the UNIX socket is removed after the application is closed.

func (*Endpoint) Listener

func (e *Endpoint) Listener(ctx context.Context) (net.Listener, error)

Listener will return listener (and error) after first configuring it. Listener is configured only once, on the first call, and the error is captured. Every subsequent call will return the same values.

Jump to

Keyboard shortcuts

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