grpceager

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: 12 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
}

`Engine` keeps entity activities alive until completion. It immediately restarts an activity if its event stream gets interrupted.

func NewEngine

func NewEngine(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) StartRegistryActivity

func (e *Engine) StartRegistryActivity(
	registry string, act grpcentities.RegistryActivity,
) error

func (*Engine) StartRepoActivity

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

See comments in `./registry.go`.

func (*Engine) StartRepoWorkflowActivity

func (e *Engine) StartRepoWorkflowActivity(
	repoId uuid.I,
	workflowId uuid.I,
	act grpcentities.RepoWorkflowActivity,
) error

See comments in `./registry.go`.

type EngineConfig

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

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