model

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerMeta

type DockerMeta struct {
	ContainerId string `json:"container_id"`
}

type GenericInfluxAnnotation

type GenericInfluxAnnotation struct {
	ContainerName string `mapstructure:"container_name"`
	MetricsType   string `mapstructure:"type"`
}

type KubernetesMeta

type KubernetesMeta struct {
	NamespaceName string            `json:"namespace_name"`
	PodName       string            `json:"pod_name"`
	PodId         string            `json:"pod_id"`
	Labels        map[string]string `json:"labels"`
	Host          string            `json:"host"`
	Annotations   map[string]string `json:"annotations"`
	ContainerName string            `json:"container_name"`
}

type LogEntry added in v1.0.0

type LogEntry struct {
	Log                   string         `json:"log"`
	Stream                string         `json:"stream"`
	Time                  time.Time      `json:"time"`
	Docker                DockerMeta     `json:"docker"`
	Kubernetes            KubernetesMeta `json:"kubernetes"`
	Datacenter            string         `json:"datacenter,omitempty"`
	KubernetesClusterName string         `json:"kubernetes_cluster_name,omitempty"`
	Ts                    uint64         `json:"_ts"`
}

type PointGroup

type PointGroup struct {
	Points      []TimePoint
	ExtraValues map[string]string
	Tags        map[string]string
}

type TimeBucket

type TimeBucket struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*TimeBucket) Append

func (tb *TimeBucket) Append(pt TimePoint) error

func (*TimeBucket) Clone

func (tb *TimeBucket) Clone() *TimeBucket

func (*TimeBucket) IsEmpty

func (tb *TimeBucket) IsEmpty() bool

func (*TimeBucket) Iter

func (tb *TimeBucket) Iter() func() (TimePoint, bool)

func (*TimeBucket) Len

func (tb *TimeBucket) Len() int

type TimePoint

type TimePoint interface {
	Ts() time.Time
	SetTs(time.Time)
	Clone() TimePoint
	String() string
}

type TimePointFloat64

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

func NewTimePointFloat64

func NewTimePointFloat64(ts time.Time, val float64) *TimePointFloat64

func (*TimePointFloat64) Clone

func (tp *TimePointFloat64) Clone() TimePoint

func (*TimePointFloat64) SetTs

func (tp *TimePointFloat64) SetTs(ts time.Time)

func (*TimePointFloat64) SetValue

func (tp *TimePointFloat64) SetValue(val float64)

func (*TimePointFloat64) String

func (tp *TimePointFloat64) String() string

func (*TimePointFloat64) Ts

func (tp *TimePointFloat64) Ts() time.Time

func (*TimePointFloat64) Value

func (tp *TimePointFloat64) Value() float64

type TimePointUInt64

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

func NewTimePointUInt64

func NewTimePointUInt64(ts time.Time, val uint64) *TimePointUInt64

func (*TimePointUInt64) Clone

func (tp *TimePointUInt64) Clone() TimePoint

func (*TimePointUInt64) SetTs

func (tp *TimePointUInt64) SetTs(ts time.Time)

func (*TimePointUInt64) SetValue

func (tp *TimePointUInt64) SetValue(val uint64)

func (*TimePointUInt64) String

func (tp *TimePointUInt64) String() string

func (*TimePointUInt64) Ts

func (tp *TimePointUInt64) Ts() time.Time

func (*TimePointUInt64) Value

func (tp *TimePointUInt64) Value() uint64

type TimeSeries

type TimeSeries struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTimeSeries

func NewTimeSeries(resolution time.Duration) *TimeSeries

func (*TimeSeries) Append

func (ts *TimeSeries) Append(tp TimePoint) error

func (*TimeSeries) Clear

func (ts *TimeSeries) Clear()

func (*TimeSeries) GetBucketCount

func (ts *TimeSeries) GetBucketCount() int

func (*TimeSeries) GetResolution

func (ts *TimeSeries) GetResolution() time.Duration

func (*TimeSeries) GetStart

func (ts *TimeSeries) GetStart() time.Time

func (*TimeSeries) Iter

func (ts *TimeSeries) Iter() func() (*TimeBucket, bool)

func (*TimeSeries) Trim

func (ts *TimeSeries) Trim(start, end time.Time) uint64

Jump to

Keyboard shortcuts

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