scheduler

package
v0.10.271 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIFOKey = "lifo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name           string
	MaxConcurrency int
	MaxStackSize   int
	Timeout        time.Duration
}

type LIFOFilter

type LIFOFilter interface {
	SetStack(*Stack)
	GetStack() *Stack
	Config(*Registry) Config
	Key() string
	SetKey(string)
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Close

func (r *Registry) Close()

func (*Registry) Config

func (r *Registry) Config(key string) Config

func (*Registry) Do

func (r *Registry) Do(routes []*routing.Route) []*routing.Route

Do implements routing.PostProcessor and sets the stack for the scheduler filters.

It preserves the existing stack when available.

type Stack

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

func (*Stack) Config

func (s *Stack) Config() Config

func (*Stack) Wait

func (s *Stack) Wait() (done func(), err error)

Jump to

Keyboard shortcuts

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