silencepb

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package silencepb is a generated protocol buffer package.

It is generated from these files:

silence.proto

It has these top-level messages:

Matcher
Comment
Silence
MeshSilence

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSilence = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSilence   = fmt.Errorf("proto: integer overflow")
)
View Source
var Matcher_Type_name = map[int32]string{
	0: "EQUAL",
	1: "REGEXP",
}
View Source
var Matcher_Type_value = map[string]int32{
	"EQUAL":  0,
	"REGEXP": 1,
}

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Author    string    `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	Comment   string    `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
	Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"`
}

DEPRECATED: A comment can be attached to a silence.

func (*Comment) Descriptor

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

func (*Comment) Marshal added in v0.6.0

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

func (*Comment) MarshalTo added in v0.6.0

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

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) Reset

func (m *Comment) Reset()

func (*Comment) Size added in v0.6.0

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

func (*Comment) String

func (m *Comment) String() string

func (*Comment) Unmarshal added in v0.6.0

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

type Matcher

type Matcher struct {
	Type Matcher_Type `protobuf:"varint,1,opt,name=type,proto3,enum=silencepb.Matcher_Type" json:"type,omitempty"`
	// The label name in a label set to against which the matcher
	// checks the pattern.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The pattern being checked according to the matcher's type.
	Pattern string `protobuf:"bytes,3,opt,name=pattern,proto3" json:"pattern,omitempty"`
}

Matcher specifies a rule, which can match or set of labels or not.

func (*Matcher) Descriptor

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

func (*Matcher) Marshal added in v0.6.0

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

func (*Matcher) MarshalTo added in v0.6.0

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

func (*Matcher) ProtoMessage

func (*Matcher) ProtoMessage()

func (*Matcher) Reset

func (m *Matcher) Reset()

func (*Matcher) Size added in v0.6.0

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

func (*Matcher) String

func (m *Matcher) String() string

func (*Matcher) Unmarshal added in v0.6.0

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

type Matcher_Type

type Matcher_Type int32

Type specifies how the given name and pattern are matched against a label set.

const (
	Matcher_EQUAL  Matcher_Type = 0
	Matcher_REGEXP Matcher_Type = 1
)

func (Matcher_Type) EnumDescriptor

func (Matcher_Type) EnumDescriptor() ([]byte, []int)

func (Matcher_Type) String

func (x Matcher_Type) String() string

type MeshSilence

type MeshSilence struct {
	Silence   *Silence  `protobuf:"bytes,1,opt,name=silence" json:"silence,omitempty"`
	ExpiresAt time.Time `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,stdtime" json:"expires_at"`
}

MeshSilence wraps a regular silence with an expiration timestamp after which the silence may be garbage collected.

func (*MeshSilence) Descriptor

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

func (*MeshSilence) Marshal added in v0.6.0

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

func (*MeshSilence) MarshalTo added in v0.6.0

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

func (*MeshSilence) ProtoMessage

func (*MeshSilence) ProtoMessage()

func (*MeshSilence) Reset

func (m *MeshSilence) Reset()

func (*MeshSilence) Size added in v0.6.0

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

func (*MeshSilence) String

func (m *MeshSilence) String() string

func (*MeshSilence) Unmarshal added in v0.6.0

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

type Silence

type Silence struct {
	// A globally unique identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// A set of matchers all of which have to be true for a silence
	// to affect a given label set.
	Matchers []*Matcher `protobuf:"bytes,2,rep,name=matchers" json:"matchers,omitempty"`
	// The time range during which the silence is active.
	StartsAt time.Time `protobuf:"bytes,3,opt,name=starts_at,json=startsAt,stdtime" json:"starts_at"`
	EndsAt   time.Time `protobuf:"bytes,4,opt,name=ends_at,json=endsAt,stdtime" json:"ends_at"`
	// The last motification made to the silence.
	UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
	// DEPRECATED: A set of comments made on the silence.
	Comments []*Comment `protobuf:"bytes,7,rep,name=comments" json:"comments,omitempty"`
	// Comment for the silence.
	CreatedBy string `protobuf:"bytes,8,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	Comment   string `protobuf:"bytes,9,opt,name=comment,proto3" json:"comment,omitempty"`
}

Silence specifies an object that ignores alerts based on a set of matchers during a given time frame.

func (*Silence) Descriptor

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

func (*Silence) Marshal added in v0.6.0

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

func (*Silence) MarshalTo added in v0.6.0

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

func (*Silence) ProtoMessage

func (*Silence) ProtoMessage()

func (*Silence) Reset

func (m *Silence) Reset()

func (*Silence) Size added in v0.6.0

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

func (*Silence) String

func (m *Silence) String() string

func (*Silence) Unmarshal added in v0.6.0

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

Jump to

Keyboard shortcuts

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