advcore

package
v0.0.0-...-575c38c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VendorJaeger = "jaeger"
	VendorZipkin = "zipkin"
	PrefixJaeger = "JAEGER_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientOptions

type HTTPClientOptions struct {
	Debug bool   `json:"debug"`
	URL   string `json:"url" validate:"nonzero"`
	Auth  struct {
		Scheme   string `json:"schema" default:"Bearer"`
		Token    string `json:"token"`
		Username string `json:"username"`
		Password string `json:"password"`
	} `json:"auth"`
}

type Options

type Options struct {
	App struct {
		Name       string `json:"name" validate:"nonzero,regexp=^[a-z][a-z0-9-]+$"`
		Debug      bool   `json:"debug"`
		DelayStart int    `json:"delay-start" validate:"min=0"`
		DelayStop  int    `json:"delay-stop" validate:"min=0"`
		Meta       struct {
			Server struct {
				Bind string `json:"bind" default:":9090"`
			} `json:"server"`
			Data map[string]interface{} `json:"data"`
		} `json:"meta"`
	} `json:"app"`
	Pprof struct {
		Disable   bool `json:"disable"`
		BlockRate int  `json:"block-rate" default:"1"`
		MutexRate int  `json:"mutex-rate" default:"1"`
	} `json:"pprof"`
	Metrics struct {
		Disable bool `json:"disable"`
	}
	Trace struct {
		Vendor string            `json:"vendor" default:"jaeger" validate:"nonzero"`
		Jaeger map[string]string `json:"jaeger"`
		Zipkin struct {
			TraceID128Bit bool `json:"trace-id-128-bit"`
			HTTP          struct {
				URL string `json:"url"`
			} `json:"http"`
			Kafka struct {
				Addresses []string `json:"addresses"`
			} `json:"kafka"`
		} `json:"zipkin"`
	} `json:"trace"`
	HTTP struct {
		Server struct {
			Bind        string `json:"bind" default:":8080" validate:"nonzero"`
			Base        string `json:"base"`
			Concurrency int64  `json:"concurrency" default:"256" validate:"nonzero"`
		} `json:"server"`
		Client map[string]HTTPClientOptions `json:"client"`
	} `json:"http"`
}

func (*Options) Validate

func (opts *Options) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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