commons

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActuatorFlagSetName   = "actuator-flag-set"
	Application           = "app"
	Arch                  = "arch"
	BuildStamp            = "buildStamp"
	DefaultActuatorPrefix = "/actuator"
	Env                   = "env"
	EnvDefaultValue       = "no environment specified"
	EnvUsage              = "env is the environment where the application is running"
	Equals                = "="
	Git                   = "git"
	GitCommitAuthor       = "commitAuthor"
	GitCommitID           = "commitId"
	GitCommitTime         = "commitTime"
	GitPrimaryBranch      = "branch"
	GitURL                = "url"
	GoRoutines            = "goroutine"
	HostName              = "hostName"
	HTTPTraceResultsSize  = 100
	OS                    = "os"
	Name                  = "name"
	NameDefaultValue      = "no application name specified"
	NameUsage             = "name is the application name"
	Port                  = "port"
	PortDefaultValue      = 8080
	PortUsage             = "port is the port number on which the application is running"
	Runtime               = "runtime"
	RuntimeVersion        = "runtimeVersion"
	Username              = "username"
	Version               = "version"
	VersionDefaultValue   = "no version specified"
	VersionUsage          = "version is the current application build version"
)

Common Constants

View Source
const (
	EnvEndpoint        = "/env"
	HTTPTraceEndpoint  = "/httpTrace"
	InfoEndpoint       = "/info"
	MetricsEndpoint    = "/metrics"
	PingEndpoint       = "/ping"
	ShutdownEndpoint   = "/shutdown"
	ThreadDumpEndpoint = "/threadDump"
)

Endpoints

View Source
const (
	ContentTypeHeader          = "Content-Type"
	ApplicationJSONContentType = "application/json"
	TextStringContentType      = "text/string"
)

Response constants

Variables

This section is empty.

Functions

func EncodeJSON

func EncodeJSON(v interface{}) ([]byte, error)

EncodeJSON is used to encode any type of data to byte array

Types

This section is empty.

Jump to

Keyboard shortcuts

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