golang

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithLocker

func WithLocker(locker locker.Service) Parameter

WithLocker sets the locker for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.RulerMonitor) Parameter

WithMonitor sets the monitor for this module.

func WithRules

func WithRules(rules rules.Service) Parameter

WithRules sets the rules for this module.

type Service

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

Service is the ruler service.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new Go ruler service.

func (*Service) RunRules

func (s *Service) RunRules(ctx context.Context,
	credentials *checker.Credentials,
	action string,
	rulesData []*ruler.RulesData,
) []rules.Result

RunRules runs a number of rules and returns a result.

Jump to

Keyboard shortcuts

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