Documentation ¶
Index ¶
- Variables
- func ParseTemplates(cfg AlertConfigDesc) map[string]string
- type AlertConfigDesc
- func (*AlertConfigDesc) Descriptor() ([]byte, []int)
- func (this *AlertConfigDesc) Equal(that interface{}) bool
- func (m *AlertConfigDesc) GetRawConfig() string
- func (m *AlertConfigDesc) GetTemplates() []*TemplateDesc
- func (m *AlertConfigDesc) GetUser() string
- func (this *AlertConfigDesc) GoString() string
- func (m *AlertConfigDesc) Marshal() (dAtA []byte, err error)
- func (m *AlertConfigDesc) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertConfigDesc) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertConfigDesc) ProtoMessage()
- func (m *AlertConfigDesc) Reset()
- func (m *AlertConfigDesc) Size() (n int)
- func (this *AlertConfigDesc) String() string
- func (m *AlertConfigDesc) Unmarshal(dAtA []byte) error
- func (m *AlertConfigDesc) XXX_DiscardUnknown()
- func (m *AlertConfigDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertConfigDesc) XXX_Merge(src proto.Message)
- func (m *AlertConfigDesc) XXX_Size() int
- func (m *AlertConfigDesc) XXX_Unmarshal(b []byte) error
- type TemplateDesc
- func (*TemplateDesc) Descriptor() ([]byte, []int)
- func (this *TemplateDesc) Equal(that interface{}) bool
- func (m *TemplateDesc) GetBody() string
- func (m *TemplateDesc) GetFilename() string
- func (this *TemplateDesc) GoString() string
- func (m *TemplateDesc) Marshal() (dAtA []byte, err error)
- func (m *TemplateDesc) MarshalTo(dAtA []byte) (int, error)
- func (m *TemplateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TemplateDesc) ProtoMessage()
- func (m *TemplateDesc) Reset()
- func (m *TemplateDesc) Size() (n int)
- func (this *TemplateDesc) String() string
- func (m *TemplateDesc) Unmarshal(dAtA []byte) error
- func (m *TemplateDesc) XXX_DiscardUnknown()
- func (m *TemplateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TemplateDesc) XXX_Merge(src proto.Message)
- func (m *TemplateDesc) XXX_Size() int
- func (m *TemplateDesc) XXX_Unmarshal(b []byte) error
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 config 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 ¶
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) 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 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) 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
Click to show internal directories.
Click to hide internal directories.