Documentation ¶
Index ¶
- func ModelLabelSetToMap(m model.LabelSet) map[string]string
- func RoundToMilliseconds(from, through time.Time) (model.Time, model.Time)
- func ToClientLabels(labels string) ([]client.LabelAdapter, error)
- func TokenFor(userID, labels string) uint32
- type ExtendedMock
- type LogAdapater
- func (l LogAdapater) Fatal(v ...interface{})
- func (l LogAdapater) Fatalf(format string, v ...interface{})
- func (l LogAdapater) Fatalln(v ...interface{})
- func (l LogAdapater) Panic(v ...interface{})
- func (l LogAdapater) Panicf(format string, v ...interface{})
- func (l LogAdapater) Panicln(v ...interface{})
- func (l LogAdapater) Print(v ...interface{})
- func (l LogAdapater) Printf(format string, v ...interface{})
- func (l LogAdapater) Println(v ...interface{})
- type MultiError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModelLabelSetToMap ¶
ModelLabelSetToMap convert a model.LabelSet to a map[string]string
func RoundToMilliseconds ¶ added in v0.2.0
RoundToMilliseconds returns milliseconds precision time from nanoseconds. from will be rounded down to the nearest milliseconds while through is rounded up.
func ToClientLabels ¶
func ToClientLabels(labels string) ([]client.LabelAdapter, error)
ToClientLabels parses the labels and converts them to the Cortex type.
Types ¶
type ExtendedMock ¶ added in v0.2.0
func (*ExtendedMock) GetMockedCallsByMethod ¶ added in v0.2.0
func (m *ExtendedMock) GetMockedCallsByMethod(method string) []mock.Call
type LogAdapater ¶ added in v0.2.0
func NewLogAdapater ¶ added in v0.2.0
func NewLogAdapater(l log.Logger) LogAdapater
func (LogAdapater) Fatal ¶ added in v0.2.0
func (l LogAdapater) Fatal(v ...interface{})
Fatal implements tail.logger
func (LogAdapater) Fatalf ¶ added in v0.2.0
func (l LogAdapater) Fatalf(format string, v ...interface{})
Fatalf implements tail.logger
func (LogAdapater) Fatalln ¶ added in v0.2.0
func (l LogAdapater) Fatalln(v ...interface{})
Fatalln implements tail.logger
func (LogAdapater) Panic ¶ added in v0.2.0
func (l LogAdapater) Panic(v ...interface{})
Panic implements tail.logger
func (LogAdapater) Panicf ¶ added in v0.2.0
func (l LogAdapater) Panicf(format string, v ...interface{})
Panicf implements tail.logger
func (LogAdapater) Panicln ¶ added in v0.2.0
func (l LogAdapater) Panicln(v ...interface{})
Panicln implements tail.logger
func (LogAdapater) Print ¶ added in v0.2.0
func (l LogAdapater) Print(v ...interface{})
Print implements tail.logger
func (LogAdapater) Printf ¶ added in v0.2.0
func (l LogAdapater) Printf(format string, v ...interface{})
Printf implements tail.logger
func (LogAdapater) Println ¶ added in v0.2.0
func (l LogAdapater) Println(v ...interface{})
Println implements tail.logger
type MultiError ¶
type MultiError []error
The MultiError type implements the error interface, and contains the Errors used to construct it.
func (*MultiError) Add ¶
func (es *MultiError) Add(err error)
Add adds the error to the error list if it is not nil.
func (MultiError) Err ¶
func (es MultiError) Err() error
Err returns the error list as an error or nil if it is empty.
func (MultiError) Error ¶
func (es MultiError) Error() string
Returns a concatenated string of the contained errors