models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudTrace

type CloudTrace struct {
	// ProjectID is the Google Cloud Project identifier to export Cloud Tracing telemetry.
	ProjectID string `mapstructure:"project_id" validate:"required"`
	// SampleRate contains the percentage rate of total requests to collect and export.
	SampleRate float64 `mapstructure:"sample_rate" validate:"required,min=0,max=100"`
}

CloudTrace contains the configuration(s) for the Google® Cloud Trace open-telemetry exporter.

type Config

type Config struct {
	// Saddle contains the configuration(s) model(s) for the saddled service.
	Saddle struct {
		// CloudTrace contains the configuration(s) for the Google® Cloud Trace open-telemetry exporter.
		CloudTrace *CloudTrace `mapstructure:"cloud_trace" validate:"omitempty,excluded_with=Jaeger StdOut"`
		// Jaeger contains the configuration(s) for the Jaeger® open-telemetry exporter.
		Jaeger *Jaeger `mapstructure:"jaeger" validate:"omitempty,excluded_with=CloudTrace StdOut"`
		// StdOut contains the configuration(s) for the stdout open-telemetry exporter.
		StdOut *StdOut `mapstructure:"stdout" validate:"omitempty,excluded_with=CloudTrace Jaeger None"`
		// None contains the configuration(s) for no trace exporter.
		None *None `mapstructure:"none" validate:"omitempty,excluded_with=CloudTrace Jaeger StdOut"`
	} `mapstructure:"saddle"`
}

Config contains the configuration(s) model for the saddled service.

type Error

type Error struct {
	// Code contains a unique code identifier for the referenced error.
	Code string `json:"code,omitempty"`
	// Message contains a user-friendly message pertaining to the details of the referenced error.
	Message string `json:"message,omitempty"`
}

Error contains an outgoing error response payload.

type Errors

type Errors struct {
	// Errors contains a collection of Error.
	Errors []*Error `json:"errors"`
}

Errors contains a collection of outgoing error response payloads.

func NewErrorResponse

func NewErrorResponse(err error, code ...string) *Errors

NewErrorResponse constructs a new instance of Errors.

func (*Errors) AppendError

func (e *Errors) AppendError(err error, code ...string) *Errors

AppendError appends a referenced error and error code to the associated Errors response.

type Jaeger

type Jaeger struct {
	// URI contains the host address of the Jaeger® service in which to export.
	URI string `mapstructure:"uri" validate:"required,uri"`
	// SampleRate contains the percentage rate of total requests to collect and export.
	SampleRate float64 `mapstructure:"sample_rate" validate:"required,min=0,max=100"`
}

Jaeger contains the configuration(s) for the Jaeger® open-telemetry exporter.

type None

type None struct {
	Disabled bool `mapstructure:"disabled" validate:"required"`
}

None contains toggle for disabling configurations.

type StatusResponse

type StatusResponse struct {
	// Version contains the version of the service.
	Version string `json:"version,omitempty"`
	// CompiledAt contains the datetime stamp representing when the service was built.
	CompiledAt string `json:"compiled_at,omitempty"`
	// ExecutedAt contains the datetime stamp representing when the service was executed.
	ExecutedAt string `json:"executed_at"`
	// Uptime contains the different of time between now and ExecutedAt.
	Uptime string `json:"uptime"`
	// BuildInfo contains details about the build information of the compiled the service executable.
	BuildInfo *debug.BuildInfo `json:"build_info"`
}

StatusResponse contains the response of a status request.

type StdOut

type StdOut struct {
	// SampleRate contains the percentage rate of total requests to collect and export.
	SampleRate float64 `mapstructure:"sample_rate" validate:"required,min=0,max=100"`
}

Jump to

Keyboard shortcuts

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