domainsocket

package
v0.0.0-...-80953ab Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transport_internet_domainsocket_config_proto protoreflect.FileDescriptor

Functions

func Dial

func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error)

func Listen

func Listen(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, handler internet.ConnHandler) (internet.Listener, error)

Types

type Config

type Config struct {

	// Path of the domain socket. This overrides the IP/Port parameter from
	// upstream caller.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Abstract speicifies whether to use abstract namespace or not.
	// Traditionally Unix domain socket is file system based. Abstract domain
	// socket can be used without acquiring file lock.
	Abstract bool `protobuf:"varint,2,opt,name=abstract,proto3" json:"abstract,omitempty"`
	// Some apps, eg. haproxy, use the full length of sockaddr_un.sun_path to
	// connect(2) or bind(2) when using abstract UDS.
	Padding bool `protobuf:"varint,3,opt,name=padding,proto3" json:"padding,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAbstract

func (x *Config) GetAbstract() bool

func (*Config) GetPadding

func (x *Config) GetPadding() bool

func (*Config) GetPath

func (x *Config) GetPath() string

func (*Config) GetUnixAddr

func (c *Config) GetUnixAddr() (*net.UnixAddr, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Listener

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

func (*Listener) Addr

func (ln *Listener) Addr() net.Addr

func (*Listener) Close

func (ln *Listener) Close() error

Jump to

Keyboard shortcuts

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