utils

package
v0.0.0-...-fef4acc Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContextTimeout : default context timeout
	ContextTimeout = 5 * time.Second

	// DialTimeout : default dial timeout
	DialTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func GetDirPath

func GetDirPath(dir string) (*string, error)

GetDirPath : resolves full path for directory

func GetListenAddr

func GetListenAddr(ipAddr string, port int) (*net.TCPAddr, error)

GetListenAddr : returns the TCP listen addr

func GetOutboundIP

func GetOutboundIP() (*net.IP, error)

GetOutboundIP : get preferred outbound ip of this machine

func NewClientConnSocket

func NewClientConnSocket(socket string) *grpc.ClientConn

NewClientConnSocket : creates new socket ClientConn

func NewClientConnTcp

func NewClientConnTcp(addr string) (*grpc.ClientConn, error)

NewClientConnTcp : creates new TCP ClientConn

func NewConsulClient

func NewConsulClient(address string) (*api.Client, error)

NewConsulClient : creates a new Consul client

Types

This section is empty.

Jump to

Keyboard shortcuts

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