crontab

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_crontab_crontab_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CompletedConfig added in v0.0.66

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

CompletedConfig ...

func (CompletedConfig) New added in v0.0.66

func (c CompletedConfig) New(ctx context.Context) (*CrontabSerivce, error)

func (CompletedConfig) Validate added in v0.0.66

func (c CompletedConfig) Validate() error

Validate checks Config.

type Config added in v0.0.66

type Config struct {
	Proto Crontab

	Validator *validator.Validate
	// contains filtered or unexported fields
}

Config ...

func NewConfig added in v0.0.66

func NewConfig(options ...ConfigOption) *Config

NewConfig returns a Config struct with the default values

func (*Config) ApplyOptions added in v0.0.66

func (o *Config) ApplyOptions(options ...ConfigOption) *Config

func (*Config) Complete added in v0.0.66

func (c *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver.

type ConfigOption added in v0.0.66

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

A ConfigOption sets options.

func WithViper added in v0.0.66

func WithViper(v *viper.Viper) ConfigOption

type ConfigOptionFunc added in v0.0.66

type ConfigOptionFunc func(*Config)

ConfigOptionFunc wraps a function that modifies Client into an implementation of the ConfigOption interface.

type Crontab added in v0.0.66

type Crontab struct {
	Enabled       bool               `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	CheckInterval *duration.Duration `protobuf:"bytes,4,opt,name=check_interval,json=checkInterval,proto3" json:"check_interval,omitempty"`
	// contains filtered or unexported fields
}

func (*Crontab) Descriptor deprecated added in v0.0.66

func (*Crontab) Descriptor() ([]byte, []int)

Deprecated: Use Crontab.ProtoReflect.Descriptor instead.

func (*Crontab) GetCheckInterval added in v0.0.66

func (x *Crontab) GetCheckInterval() *duration.Duration

func (*Crontab) GetEnabled added in v0.0.66

func (x *Crontab) GetEnabled() bool

func (*Crontab) ProtoMessage added in v0.0.66

func (*Crontab) ProtoMessage()

func (*Crontab) ProtoReflect added in v0.0.66

func (x *Crontab) ProtoReflect() protoreflect.Message

func (*Crontab) Reset added in v0.0.66

func (x *Crontab) Reset()

func (*Crontab) String added in v0.0.66

func (x *Crontab) String() string

type CrontabSerivce added in v0.0.66

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

Crontab ...

func NewCrontabSerivce added in v0.0.66

func NewCrontabSerivce(
	checkInterval time.Duration,
) *CrontabSerivce

NewCrontab ...

func (*CrontabSerivce) Register added in v0.0.66

func (c *CrontabSerivce) Register(f func(context.Context, *logrus.Entry) error)

Register ...

func (*CrontabSerivce) Run added in v0.0.66

func (c *CrontabSerivce) Run(ctx context.Context) error

Run will initialize the backend. It must not block, but may run go routines in the background.

func (*CrontabSerivce) Serve added in v0.0.66

func (c *CrontabSerivce) Serve(ctx context.Context) error

Serve ...

func (*CrontabSerivce) Shutdown added in v0.0.66

func (c *CrontabSerivce) Shutdown()

Shutdown ...

type EmptyConfigOption added in v0.0.66

type EmptyConfigOption struct{}

EmptyConfigOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

Jump to

Keyboard shortcuts

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