Back to godoc.org

Package metatags

v0.13.2 (b2e91b5)
Latest Go to latest
Published: Jul 6, 2020 | License: AGPL-3.0 | Module: github.com/grafana/metrictank

Index

Package Files

type MetaRecordStatusByOrg

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

func NewMetaRecordStatusByOrg

func NewMetaRecordStatusByOrg() MetaRecordStatusByOrg

func (*MetaRecordStatusByOrg) GetStatus

func (m *MetaRecordStatusByOrg) GetStatus(orgId uint32) (UUID, uint64, uint64)

func (*MetaRecordStatusByOrg) Update

func (m *MetaRecordStatusByOrg) Update(orgId uint32, newBatch UUID, newCreatedAt, newLastUpdate uint64) (bool, UUID)

update takes the properties describing a batch of meta records and updates its internal status if necessary it returns a boolean indicating whether a reload of the meta records is necessary and if it is then the second returned value is the batch id that needs to be loaded

type UUID

type UUID [16]byte

UUIDs are used as meta record batch IDs

var (
	// this batch id is used if we handle an upsert request for an org that has
	// no current batch
	DefaultBatchId UUID
)

func ParseUUID

func ParseUUID(input string) (UUID, error)

ParseUUID parses a 32 digit hexadecimal number (that might contain hypens) representing an UUID.

func RandomUUID

func RandomUUID() (UUID, error)

RandomUUID generates a randomized UUID, the code is copied from gocql.RandomUUID()

func (UUID) String

func (u UUID) String() string

String returns the UUID in it's canonical form, a 32 digit hexadecimal number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier