opentrace

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinHttpTrace

func GinHttpTrace(notTrace ...string) gin.HandlerFunc

func TypeSliceContains

func TypeSliceContains(enums []Type, sunEnums ...Type) bool

TypeSliceContains reports whether sunEnums is within enums.

func TypeSliceContainsAny

func TypeSliceContainsAny(enums []Type, sunEnums ...Type) bool

TypeSliceContainsAny reports whether any sunEnum is within enums.

Types

type CompletedConfig

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

func (CompletedConfig) Apply

func (c CompletedConfig) Apply() (io.Closer, error)

type Config

type Config struct {
	Enabled       bool
	ServiceName   string
	Type          Type
	Configuration jeagerConf.Configuration
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

NewConfig returns a Config struct with the default values

func (*Config) Complete

func (s *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver.

func (*Config) Validate

func (s *Config) Validate() []error

Validate checks Config and return a slice of found errs.

type Type

type Type int
const (
	TypeJeager Type = iota
	TypeZipkin
	TypeButt
)

func ParseTypeString

func ParseTypeString(s string) (Type, error)

ParseTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func TypeValues

func TypeValues() []Type

TypeValues returns all values of the enum

func (Type) MarshalBinary

func (i Type) MarshalBinary() (data []byte, err error)

MarshalBinary implements the encoding.BinaryMarshaler interface for Type

func (Type) MarshalJSON

func (i Type) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Type

func (Type) MarshalText

func (i Type) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Type

func (Type) MarshalYAML

func (i Type) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for Type

func (Type) Registered

func (i Type) Registered() bool

IsAType returns "true" if the value is listed in the enum definition. "false" otherwise

func (*Type) Scan

func (i *Type) Scan(value interface{}) error

func (Type) String

func (i Type) String() string

func (*Type) UnmarshalBinary

func (i *Type) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Type

func (*Type) UnmarshalJSON

func (i *Type) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Type

func (*Type) UnmarshalText

func (i *Type) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Type

func (*Type) UnmarshalYAML

func (i *Type) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for Type

func (Type) Value

func (i Type) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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