util

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrInvalidPortName happens if your port name is illegal
	ErrInvalidPortName = errors.New("invalid port name, port name must be {protocol}-<suffix>")
	//ErrInvalidURL happens if your utl is illegal
	ErrInvalidURL = errors.New("invalid url, url must be {protocol}://{service-name}:{port-name}")
)

Functions

func GenProtoEndPoint added in v1.0.1

func GenProtoEndPoint(proto, port string) string

GenProtoEndPoint generate proto and port

func ParsePortName

func ParsePortName(n string) (string, string, error)

ParsePortName a port name is composite by protocol-name,like http-admin,http-api,grpc-console,grpc-api ParsePortName return two string separately

func ParseServiceAndPort added in v1.0.1

func ParseServiceAndPort(n string) (string, string, error)

ParseServiceAndPort returns service name and port name

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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