platform

package module
Version: v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve added in v0.1.0

func Serve(ctx context.Context, srv *Server) error

Serve starts the server listening process

Types

type InstrumentationConfig added in v0.0.5

type InstrumentationConfig struct {
	Network    string `toml:"network" default:"tcp" comment:"Network class used for listen (tcp, tcp4, tcp6, unixsocket)"`
	Listen     string `toml:"listen" default:":5556" comment:"Listen address for instrumentation server"`
	Diagnostic struct {
		Enabled bool              `toml:"enabled" default:"true" comment:"Enable diagnostic handlers"`
		Config  diagnostic.Config `toml:"Config" comment:"Diagnostic settings"`
	} `toml:"Diagnostic" comment:"###############################\n Diagnotic Settings \n##############################"`
	Logs struct {
		Level     string `toml:"level" default:"warn" comment:"Log level: debug, info, warn, error, dpanic, panic, and fatal"`
		SentryDSN string `toml:"sentryDSN" comment:"Sentry DSN"`
	} `toml:"Logs" comment:"###############################\n Logs Settings \n##############################"`
	Prometheus struct {
		Enabled bool              `toml:"enabled" default:"true" comment:"Enable metric instrumentation"`
		Config  prometheus.Config `toml:"Config" comment:"Prometheus settings"`
	} `toml:"Prometheus" comment:"###############################\n Prometheus exporter \n##############################"`
	Jaeger struct {
		Enabled bool          `toml:"enabled" default:"true" comment:"Enable trace instrumentation"`
		Config  jaeger.Config `toml:"Config" comment:"Jaeger settings"`
	} `toml:"Jaeger" comment:"###############################\n Jaeger exporter \n##############################"`
	OCAgent struct {
		Enabled bool           `toml:"enabled" default:"false" comment:"Enable trace instrumentation"`
		Config  ocagent.Config `toml:"Config" comment:"OpenCensus agent settings"`
	} `toml:"OCAgent" comment:"###############################\n OpenCensus Agent exporter \n##############################"`
	Runtime struct {
		Enabled bool           `toml:"enabled" default:"true" comment:"Enable go runtime metric exporter"`
		Config  runtime.Config `toml:"Config" comment:"Runtime export settings"`
	} `toml:"Runtime" comment:"###############################\n Runtime metrics exporter \n##############################"`
}

InstrumentationConfig holds all platform instrumentation settings

type Server added in v0.1.0

type Server struct {
	Debug           bool
	Name            string
	Version         string
	Revision        string
	Instrumentation InstrumentationConfig
	Builder         func(upg *tableflip.Upgrader, group *run.Group)
}

Server represents platform server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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