Help us shape the future of Go! Take the 2026 Go Developer Survey

log

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	ID             string
	NamespaceID    uint64
	NotificationID string
	SubscriptionID uint64
	ReceiverID     uint64
	AlertIDs       []int64
	SilenceIDs     []string
	CreatedAt      time.Time
}

type NotificationFilter

type NotificationFilter struct {
	SilenceID string
}

type NotificationLogRepository

type NotificationLogRepository interface {
	BulkCreate(context.Context, []Notification) error
	ListAlertIDsBySilenceID(context.Context, string) ([]int64, error)
	ListSubscriptionIDsBySilenceID(context.Context, string) ([]int64, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(nlr NotificationLogRepository) *Service

func (*Service) ListAlertIDsBySilenceID

func (s *Service) ListAlertIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)

func (*Service) ListSubscriptionIDsBySilenceID

func (s *Service) ListSubscriptionIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)

func (*Service) LogNotifications

func (s *Service) LogNotifications(ctx context.Context, nlogs ...Notification) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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