grpccron

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewCronEngine

func NewCronEngine(lg Logger, cfg *EngineConfig) *Engine

func (*Engine) Run

func (e *Engine) Run() error

func (*Engine) SetContext

func (e *Engine) SetContext(ctx context.Context)

func (*Engine) StartRepoActivity

func (e *Engine) StartRepoActivity(
	repoId uuid.I, act grpcentities.RepoActivity,
) error

type EngineConfig

type EngineConfig struct {
	Conn          *grpc.ClientConn
	SysRPCCreds   credentials.PerRPCCredentials
	StreamLimiter Limiter
	CronInterval  time.Duration
}

type Limiter

type Limiter interface {
	Acquire(ctx context.Context, n int64) error
	Release(n int64)
}

type Logger

type Logger interface {
	Infow(msg string, kv ...interface{})
	Warnw(msg string, kv ...interface{})
	Errorw(msg string, kv ...interface{})
}

Jump to

Keyboard shortcuts

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