guardutils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinimumInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger(logLevel string) *zap.SugaredLogger

func Sanitize

func Sanitize(in string) string

contain at most 60 characters contain only lowercase alphanumeric characters or '-' start with an alphanumeric character end with an alphanumeric character

Types

type Stat

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

func (*Stat) Add

func (s *Stat) Add(key string)

func (*Stat) Init

func (s *Stat) Init()

func (*Stat) Log

func (s *Stat) Log() string

type Ticker

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

func NewTicker

func NewTicker(minimumInterval time.Duration) *Ticker

func (*Ticker) Ch

func (t *Ticker) Ch() <-chan time.Time

func (*Ticker) Parse

func (t *Ticker) Parse(intervalStr string, defaultInterval time.Duration) error

func (*Ticker) Start

func (t *Ticker) Start()

func (*Ticker) Stop

func (t *Ticker) Stop()

Jump to

Keyboard shortcuts

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