alertspb

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAlerts = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAlerts   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrNotFound = errors.New("alertmanager storage object not found")
)

Functions

func ParseTemplates

func ParseTemplates(cfg AlertConfigDesc) map[string]string

ParseTemplates returns a alertmanager config object

Types

type AlertConfigDesc

type AlertConfigDesc struct {
	User      string          `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	RawConfig string          `protobuf:"bytes,2,opt,name=raw_config,json=rawConfig,proto3" json:"raw_config,omitempty"`
	Templates []*TemplateDesc `protobuf:"bytes,3,rep,name=templates,proto3" json:"templates,omitempty"`
}

func ToProto

func ToProto(cfg string, templates map[string]string, user string) AlertConfigDesc

ToProto transforms a yaml Alertmanager config and map of template files to an AlertConfigDesc

func (*AlertConfigDesc) Descriptor

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

func (*AlertConfigDesc) Equal

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

func (*AlertConfigDesc) GetRawConfig

func (m *AlertConfigDesc) GetRawConfig() string

func (*AlertConfigDesc) GetTemplates

func (m *AlertConfigDesc) GetTemplates() []*TemplateDesc

func (*AlertConfigDesc) GetUser

func (m *AlertConfigDesc) GetUser() string

func (*AlertConfigDesc) GoString

func (this *AlertConfigDesc) GoString() string

func (*AlertConfigDesc) Marshal

func (m *AlertConfigDesc) Marshal() (dAtA []byte, err error)

func (*AlertConfigDesc) MarshalTo

func (m *AlertConfigDesc) MarshalTo(dAtA []byte) (int, error)

func (*AlertConfigDesc) MarshalToSizedBuffer

func (m *AlertConfigDesc) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AlertConfigDesc) ProtoMessage

func (*AlertConfigDesc) ProtoMessage()

func (*AlertConfigDesc) Reset

func (m *AlertConfigDesc) Reset()

func (*AlertConfigDesc) Size

func (m *AlertConfigDesc) Size() (n int)

func (*AlertConfigDesc) String

func (this *AlertConfigDesc) String() string

func (*AlertConfigDesc) Unmarshal

func (m *AlertConfigDesc) Unmarshal(dAtA []byte) error

func (*AlertConfigDesc) XXX_DiscardUnknown

func (m *AlertConfigDesc) XXX_DiscardUnknown()

func (*AlertConfigDesc) XXX_Marshal

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

func (*AlertConfigDesc) XXX_Merge

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

func (*AlertConfigDesc) XXX_Size

func (m *AlertConfigDesc) XXX_Size() int

func (*AlertConfigDesc) XXX_Unmarshal

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

type FullStateDesc added in v1.9.0

type FullStateDesc struct {
	State *clusterpb.FullState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
}

func (*FullStateDesc) Descriptor added in v1.9.0

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

func (*FullStateDesc) GetState added in v1.9.0

func (m *FullStateDesc) GetState() *clusterpb.FullState

func (*FullStateDesc) GoString added in v1.9.0

func (this *FullStateDesc) GoString() string

func (*FullStateDesc) Marshal added in v1.9.0

func (m *FullStateDesc) Marshal() (dAtA []byte, err error)

func (*FullStateDesc) MarshalTo added in v1.9.0

func (m *FullStateDesc) MarshalTo(dAtA []byte) (int, error)

func (*FullStateDesc) MarshalToSizedBuffer added in v1.9.0

func (m *FullStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FullStateDesc) ProtoMessage added in v1.9.0

func (*FullStateDesc) ProtoMessage()

func (*FullStateDesc) Reset added in v1.9.0

func (m *FullStateDesc) Reset()

func (*FullStateDesc) Size added in v1.9.0

func (m *FullStateDesc) Size() (n int)

func (*FullStateDesc) String added in v1.9.0

func (this *FullStateDesc) String() string

func (*FullStateDesc) Unmarshal added in v1.9.0

func (m *FullStateDesc) Unmarshal(dAtA []byte) error

func (*FullStateDesc) XXX_DiscardUnknown added in v1.9.0

func (m *FullStateDesc) XXX_DiscardUnknown()

func (*FullStateDesc) XXX_Marshal added in v1.9.0

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

func (*FullStateDesc) XXX_Merge added in v1.9.0

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

func (*FullStateDesc) XXX_Size added in v1.9.0

func (m *FullStateDesc) XXX_Size() int

func (*FullStateDesc) XXX_Unmarshal added in v1.9.0

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

type TemplateDesc

type TemplateDesc struct {
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	Body     string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
}

func (*TemplateDesc) Descriptor

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

func (*TemplateDesc) Equal

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

func (*TemplateDesc) GetBody

func (m *TemplateDesc) GetBody() string

func (*TemplateDesc) GetFilename

func (m *TemplateDesc) GetFilename() string

func (*TemplateDesc) GoString

func (this *TemplateDesc) GoString() string

func (*TemplateDesc) Marshal

func (m *TemplateDesc) Marshal() (dAtA []byte, err error)

func (*TemplateDesc) MarshalTo

func (m *TemplateDesc) MarshalTo(dAtA []byte) (int, error)

func (*TemplateDesc) MarshalToSizedBuffer

func (m *TemplateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TemplateDesc) ProtoMessage

func (*TemplateDesc) ProtoMessage()

func (*TemplateDesc) Reset

func (m *TemplateDesc) Reset()

func (*TemplateDesc) Size

func (m *TemplateDesc) Size() (n int)

func (*TemplateDesc) String

func (this *TemplateDesc) String() string

func (*TemplateDesc) Unmarshal

func (m *TemplateDesc) Unmarshal(dAtA []byte) error

func (*TemplateDesc) XXX_DiscardUnknown

func (m *TemplateDesc) XXX_DiscardUnknown()

func (*TemplateDesc) XXX_Marshal

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

func (*TemplateDesc) XXX_Merge

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

func (*TemplateDesc) XXX_Size

func (m *TemplateDesc) XXX_Size() int

func (*TemplateDesc) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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