Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // RulesFiles maps from a rules filename to file contents. RulesFiles RulesConfig `json:"rules_files"` AlertmanagerConfig string `json:"alertmanager_config"` }
A Config is a Cortex configuration for a single user.
type ID ¶
type ID int
An ID is the ID of a single users's Cortex configuration. When a configuration changes, it gets a new ID.
type RulesConfig ¶
RulesConfig are the set of rules files for a particular organization.
func (RulesConfig) Equal ¶
func (c RulesConfig) Equal(o RulesConfig) bool
Equal compares two RulesConfigs for equality.
instance Eq RulesConfig
type VersionedRulesConfig ¶
type VersionedRulesConfig struct { ID ID `json:"id"` Config RulesConfig `json:"config"` DeletedAt time.Time `json:"deleted_at"` }
VersionedRulesConfig is a RulesConfig together with a version. `data Versioned a = Versioned { id :: ID , config :: a }`
func (VersionedRulesConfig) IsDeleted ¶
func (vr VersionedRulesConfig) IsDeleted() bool
IsDeleted tells you if the config is deleted.
type View ¶
type View struct { ID ID `json:"id"` Config Config `json:"config"` DeletedAt time.Time `json:"deleted_at"` }
View is what's returned from the Weave Cloud configs service when we ask for all Cortex configurations.
The configs service is essentially a JSON blob store that gives each _version_ of a configuration a unique ID and guarantees that later versions have greater IDs.
func (View) GetVersionedRulesConfig ¶
func (v View) GetVersionedRulesConfig() *VersionedRulesConfig
GetVersionedRulesConfig specializes the view to just the rules config.