models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matchers

type Matchers struct {
	IsEqual bool   `json:"isEqual" yaml:"isEqual"`
	IsRegex bool   `json:"isRegex" yaml:"isRegex"`
	Name    string `json:"name" yaml:"name"`
	Value   string `json:"value" yaml:"value"`
}

func (Matchers) String

func (o Matchers) String() string

type Shedule

type Shedule struct {
	Cron     string  `yaml:"cron"`     // Crontab defaining time to start silence.
	Duration int     `yaml:"duration"` // Duration of silence in seconds.
	Silence  Silence `yaml:"silence"`  // Duration of silence in seconds.
	// contains filtered or unexported fields
}

func (*Shedule) GetEntryID added in v0.0.3

func (o *Shedule) GetEntryID() cron.EntryID

func (*Shedule) Run

func (o *Shedule) Run(apiURL string, log *zap.Logger, stat *stats.Instance, prom *metrics.Instance)

func (*Shedule) SetEntryID added in v0.0.3

func (o *Shedule) SetEntryID(id cron.EntryID)

func (Shedule) String

func (o Shedule) String() string

type SheduleSection

type SheduleSection struct {
	Shedules       []Shedule  `yaml:"shedules"`       // Shedules in section.
	TimeOffset     string     `yaml:"timeoffset"`     // смещение в часах от UTC. может быть как + так и -. ""=local
	GlobalMatchers []Matchers `yaml:"globalmatchers"` // Matchers added in all silences in SeduleSection
	// contains filtered or unexported fields
}

func (*SheduleSection) GetSectionForWeb added in v0.0.3

func (o *SheduleSection) GetSectionForWeb() []string

func (*SheduleSection) GetSectionName

func (o *SheduleSection) GetSectionName() string

func (*SheduleSection) GetToken

func (o *SheduleSection) GetToken() string

func (*SheduleSection) Run

func (o *SheduleSection) Run(apiURL string, logger *zap.Logger, stat *stats.Instance, prom *metrics.Instance)

func (*SheduleSection) SetSectionName

func (o *SheduleSection) SetSectionName(name string)

func (*SheduleSection) SetToken

func (o *SheduleSection) SetToken(token string)

func (*SheduleSection) Stop

func (o *SheduleSection) Stop()

func (*SheduleSection) String

func (o *SheduleSection) String() string

type Silence

type Silence struct {
	Comment   string     `json:"comment" yaml:"comment"`
	CreatedBy string     `json:"createdBy" yaml:"createdBy"`
	EndsAt    time.Time  `json:"endsAt" yaml:"endsAt"`
	StartsAt  time.Time  `json:"startsAt" yaml:"startAt"`
	Matchers  []Matchers `json:"matchers" yaml:"matchers"`
}

func (Silence) String

func (o Silence) String() string

type SilenceID

type SilenceID struct {
	SilenceID string `json:"silenceID"`
}

func (SilenceID) String

func (o SilenceID) String() string

Jump to

Keyboard shortcuts

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