monitor

package
v0.0.0-...-8366d43 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultTimeout        = time.Second
	DefaultCleanupTimeout = time.Second * 10
	DefaultMaxLatency     = time.Millisecond * 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AssignRole(ctx context.Context, roleName string, actor perm.Actor) (time.Duration, error)
	CreateRole(ctx context.Context, name string, permissions ...perm.Permission) (perm.Role, time.Duration, error)
	DeleteRole(ctx context.Context, name string) (time.Duration, error)
	HasPermission(ctx context.Context, actor perm.Actor, action, resource string) (bool, time.Duration, error)
	UnassignRole(ctx context.Context, roleName string, actor perm.Actor) (time.Duration, error)
}

type Option

type Option func(*options)

func WithCleanupTimeout

func WithCleanupTimeout(cleanupTimeout time.Duration) Option

func WithMaxLatency

func WithMaxLatency(latency time.Duration) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

type Probe

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

func NewProbe

func NewProbe(client Client, sender Sender, logger logx.Logger, opts ...Option) *Probe

func (*Probe) Run

func (p *Probe) Run()

type Sender

type Sender interface {
	Gauge(string, int64, float32) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
recordingfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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