system

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hostname

func Hostname() string

Hostname return hostname

func IP

func IP() string

IP return host ip

func ServiceName

func ServiceName() string

ServiceName return application name

func ServiceVersion

func ServiceVersion() string

ServiceVersion return application version

func StartAt

func StartAt() time.Time

StartAt return hostname

func TraceBizID

func TraceBizID() string

TraceBizID return application trace biz id

func TraceReqID

func TraceReqID() string

TraceReqID return application trace request id

func TraceSpanID

func TraceSpanID() string

TraceSpanID return application trace span id

func TraceUID

func TraceUID() string

TraceUID return application trace uid

Types

type Config

type Config struct {
	Name        string `config:"name"`
	Version     string `config:"version"`
	TraceUID    string `config:"traceUid"`
	TraceReqID  string `config:"traceReqId"`
	TraceSpanID string `config:"traceSpanId"`
	TraceBizID  string `config:"traceBizId"`
}

Config of system

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig of system

func StdConfig

func StdConfig() *Config

StdConfig get from box file

func (*Config) Build

func (c *Config) Build() *System

Build system

func (*Config) Path

func (c *Config) Path() string

type RuntimeStatus

type RuntimeStatus struct {
	StartAt  time.Time // Application start time.
	Hostname string    // Runtime host's hostname.
	IP       string    // Runtime host's ip.
}

RuntimeStatus runtime status

func Runtime

func Runtime() RuntimeStatus

Runtime return application runtime status.

type System

type System struct {
	// contains filtered or unexported fields
}

System is application's information

var (
	Default *System
)

Jump to

Keyboard shortcuts

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