net

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UDS unixDomainSocketUtils

UDS unix domain socket utils

Functions

func Listen

func Listen(endpoint *Endpoint) (net.Listener, error)

Listen listen net address

func ListenUnixDomain

func ListenUnixDomain(addr string) (net.Listener, error)

ListenUnixDomain safe listen unix domain socket

Types

type Endpoint

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

Endpoint endpoint to connect to

func ParseEndpoint

func ParseEndpoint(src string) (*Endpoint, error)

ParseEndpoint parse endpoint address

func (*Endpoint) Address

func (ep *Endpoint) Address() (string, error)

Address makes net address

func (*Endpoint) FQN

func (ep *Endpoint) FQN() string

FQN full qualified name

func (*Endpoint) HostPort

func (ep *Endpoint) HostPort() (host, port string, err error)

HostPort gives host - port if TCP case is

func (*Endpoint) IsUnixDomain

func (ep *Endpoint) IsUnixDomain() bool

IsUnixDomain returns true when endpoint is unix domain socket

func (*Endpoint) String

func (ep *Endpoint) String() string

type Schema

type Schema string

Schema ...

const (
	//SchemeUnixHTTP обозначим схему как http-unix://[/]socket_path/path[?query]
	SchemeUnixHTTP Schema = "http+unix"
	//SchemeHTTPS like https://
	SchemeHTTPS Schema = "https"
	//SchemeHTTP like http://
	SchemeHTTP Schema = "http"
)

func (Schema) Is

func (s Schema) Is(another interface{}) bool

Is check is s == another

Jump to

Keyboard shortcuts

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