common

package
v0.0.0-...-f0dc348 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.1"

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(a *kingpin.Application)

AddFlags adds the flags used by this package to the Kingpin application. To use the default Kingpin application, call AddFlags(kingpin.CommandLine)

func GetVersion

func GetVersion() string

func ParseServicePath

func ParseServicePath(path string) (string, string)

ParseServicePath extracts service and identification information from a request path. Supported syntaxes: - service.method or - service/identification.method

func RecvMessage

func RecvMessage(conn net.Conn) (closed bool, msgBytes []byte, msg *cellaserv.Message, err error)

RecvMessage reads and return a cellaserv message from an open connection.

func SendMessage

func SendMessage(conn net.Conn, msg *cellaserv.Message) error

func SendRawMessage

func SendRawMessage(conn net.Conn, msg []byte) error

Types

type Logger

type Logger interface {
	Debug(...interface{})
	Debugln(...interface{})
	Debugf(string, ...interface{})

	Info(...interface{})
	Infoln(...interface{})
	Infof(string, ...interface{})

	Warn(...interface{})
	Warnln(...interface{})
	Warnf(string, ...interface{})

	Error(...interface{})
	Errorln(...interface{})
	Errorf(string, ...interface{})

	Fatal(...interface{})
	Fatalln(...interface{})
	Fatalf(string, ...interface{})
}

Logger is the interface for loggers used in the Prometheus components.

func NewLogger

func NewLogger(module string) Logger

Jump to

Keyboard shortcuts

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