v1

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrometheusConfigCrd = crd.NewCrd("config.prometheus.io",
	"prometheusconfigs",
	"config.prometheus.io",
	"v1",
	"PrometheusConfig",
	"pc",
	false,
	&PrometheusConfig{})

Functions

This section is empty.

Types

type PrometheusConfig

type PrometheusConfig struct {
	// Metadata contains the object metadata for this resource
	Metadata core.Metadata `protobuf:"bytes,101,opt,name=metadata,proto3" json:"metadata"`
	// inline string containing the prometheus config
	// json_name must refer to the data key in the configmap we expect
	Prometheus string `protobuf:"bytes,1,opt,name=prometheus,json=prometheus.yml,proto3" json:"prometheus,omitempty"`
	// inline string containing the alerts config. currently unused by supergloo
	Alerts string `protobuf:"bytes,2,opt,name=alerts,proto3" json:"alerts,omitempty"`
	// inline string containing the rules config. currently unused by supergloo
	Rules                string   `protobuf:"bytes,3,opt,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PrometheusConfig represents a Kubernetes ConfigMap containing a Prometheus config yaml stored with the key `prometheus.yml`. SuperGloo uses conversion functions to convert from a configmap to a typed Prometheus config.

func NewPrometheusConfig

func NewPrometheusConfig(namespace, name string) *PrometheusConfig

func (*PrometheusConfig) DeepCopyObject

func (o *PrometheusConfig) DeepCopyObject() runtime.Object

func (*PrometheusConfig) Descriptor

func (*PrometheusConfig) Descriptor() ([]byte, []int)

func (*PrometheusConfig) Equal

func (this *PrometheusConfig) Equal(that interface{}) bool

func (*PrometheusConfig) GetAlerts

func (m *PrometheusConfig) GetAlerts() string

func (*PrometheusConfig) GetMetadata

func (m *PrometheusConfig) GetMetadata() core.Metadata

func (*PrometheusConfig) GetObjectKind

func (o *PrometheusConfig) GetObjectKind() schema.ObjectKind

func (*PrometheusConfig) GetPrometheus

func (m *PrometheusConfig) GetPrometheus() string

func (*PrometheusConfig) GetRules

func (m *PrometheusConfig) GetRules() string

func (*PrometheusConfig) Hash

func (r *PrometheusConfig) Hash() uint64

func (*PrometheusConfig) ProtoMessage

func (*PrometheusConfig) ProtoMessage()

func (*PrometheusConfig) Reset

func (m *PrometheusConfig) Reset()

func (*PrometheusConfig) SetMetadata

func (r *PrometheusConfig) SetMetadata(meta core.Metadata)

func (*PrometheusConfig) String

func (m *PrometheusConfig) String() string

func (*PrometheusConfig) XXX_DiscardUnknown

func (m *PrometheusConfig) XXX_DiscardUnknown()

func (*PrometheusConfig) XXX_Marshal

func (m *PrometheusConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrometheusConfig) XXX_Merge

func (m *PrometheusConfig) XXX_Merge(src proto.Message)

func (*PrometheusConfig) XXX_Size

func (m *PrometheusConfig) XXX_Size() int

func (*PrometheusConfig) XXX_Unmarshal

func (m *PrometheusConfig) XXX_Unmarshal(b []byte) error

type PrometheusConfigClient

type PrometheusConfigClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*PrometheusConfig, error)
	Write(resource *PrometheusConfig, opts clients.WriteOpts) (*PrometheusConfig, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (PrometheusConfigList, error)
	Watch(namespace string, opts clients.WatchOpts) (<-chan PrometheusConfigList, <-chan error, error)
}

func NewPrometheusConfigClient

func NewPrometheusConfigClient(rcFactory factory.ResourceClientFactory) (PrometheusConfigClient, error)

func NewPrometheusConfigClientWithBase

func NewPrometheusConfigClientWithBase(rc clients.ResourceClient) PrometheusConfigClient

func NewPrometheusConfigClientWithToken

func NewPrometheusConfigClientWithToken(rcFactory factory.ResourceClientFactory, token string) (PrometheusConfigClient, error)

type PrometheusConfigList

type PrometheusConfigList []*PrometheusConfig

func (PrometheusConfigList) AsInterfaces

func (list PrometheusConfigList) AsInterfaces() []interface{}

func (PrometheusConfigList) AsResources

func (list PrometheusConfigList) AsResources() resources.ResourceList

func (PrometheusConfigList) Clone

func (PrometheusConfigList) Each

func (list PrometheusConfigList) Each(f func(element *PrometheusConfig))

func (PrometheusConfigList) Find

func (list PrometheusConfigList) Find(namespace, name string) (*PrometheusConfig, error)

namespace is optional, if left empty, names can collide if the list contains more than one with the same name

func (PrometheusConfigList) Names

func (list PrometheusConfigList) Names() []string

func (PrometheusConfigList) NamespacesDotNames

func (list PrometheusConfigList) NamespacesDotNames() []string

func (PrometheusConfigList) Sort

type PrometheusConfigReconciler

type PrometheusConfigReconciler interface {
	Reconcile(namespace string, desiredResources PrometheusConfigList, transition TransitionPrometheusConfigFunc, opts clients.ListOpts) error
}

func NewPrometheusConfigReconciler

func NewPrometheusConfigReconciler(client PrometheusConfigClient) PrometheusConfigReconciler

type PrometheusconfigsByNamespace

type PrometheusconfigsByNamespace map[string]PrometheusConfigList

func (PrometheusconfigsByNamespace) Add

func (byNamespace PrometheusconfigsByNamespace) Add(prometheusConfig ...*PrometheusConfig)

func (PrometheusconfigsByNamespace) Clear

func (byNamespace PrometheusconfigsByNamespace) Clear(namespace string)

func (PrometheusconfigsByNamespace) Clone

func (PrometheusconfigsByNamespace) List

type TransitionPrometheusConfigFunc

type TransitionPrometheusConfigFunc func(original, desired *PrometheusConfig) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

Jump to

Keyboard shortcuts

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