runtime

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const SHARED_SETTING_PREFIX = "REEVE_SHARED_"
View Source
const TIMEOUT_ACTIVITY = 2 * time.Minute
View Source
const TIMEOUT_QUEUE = 1 * time.Minute

Variables

This section is empty.

Functions

func FilterPipeline

func FilterPipeline(r io.Reader, w io.Writer, prefix string) error

Types

type CLIPlugin

type CLIPlugin struct {
	plugin.Plugin
	CLIMethods map[string]string
}

type Contract

type Contract struct {
	sync.Mutex
	Consumer sync.Mutex
	Contract string
	// contains filtered or unexported fields
}

func (*Contract) Cancel

func (c *Contract) Cancel()

func (*Contract) Finish

func (c *Contract) Finish()

func (*Contract) IsCanceled

func (c *Contract) IsCanceled() bool

func (*Contract) Next

func (c *Contract) Next(timeout time.Duration, cancelCb cancelCbFunc) string

type ContractQueue

type ContractQueue[T any] struct {
	queue.Queue[T]
	Contract Contract
}

type PluginAPI

type PluginAPI struct {
	Plugin  string
	Runtime *Runtime
}

func NewPluginAPI

func NewPluginAPI(plugin string, runtime *Runtime) *PluginAPI

func (*PluginAPI) Close

func (api *PluginAPI) Close() error

func (*PluginAPI) NotifyMessages

func (api *PluginAPI) NotifyMessages(messages []schema.Message) error

func (*PluginAPI) NotifyTriggers

func (api *PluginAPI) NotifyTriggers(triggers []schema.Trigger) error

type PluginProvider

type PluginProvider struct {
	Plugins map[string]plugin.Plugin

	MessagePlugins  map[string]plugin.Plugin
	DiscoverPlugins map[string]plugin.Plugin
	ResolvePlugins  map[string]plugin.Plugin
	NotifyPlugins   map[string]plugin.Plugin
	CLIPlugins      map[string]CLIPlugin
}

func (*PluginProvider) Close

func (p *PluginProvider) Close()

type Runtime

type Runtime struct {
	PluginDirectory     string
	HTTPPort, HTTPSPort string
	PathPrefix          string
	TLSCert, TLSKey     string

	Log, ProcLog, ErrorLog *log.Logger

	MessageSecrets map[string]bool
	CLISecrets     map[string]bool
	WorkerSecrets  map[string]bool
	WorkerGroups   map[string]bool

	MessageQueue queue.Queue[schema.FullMessage]
	StatusQueue  queue.Queue[schema.PipelineStatus]
	TriggerQueue queue.Queue[schema.Trigger]
	NotifyQueue  queue.Queue[schema.PipelineStatus]

	MessageQueues map[string]queue.Queue[schema.FullMessage]
	WorkerQueues  map[string]*ContractQueue[activity.PipelineActivity]
	Activity      map[string]*activity.RuntimeActivity

	QueueTimeout time.Duration

	PluginProvider PluginProvider

	Status chan []string
}

func GetRuntime

func GetRuntime() *Runtime

func (*Runtime) LoadPlugins

func (runtime *Runtime) LoadPlugins() error

func (*Runtime) LogQueueStatus

func (runtime *Runtime) LogQueueStatus()

func (*Runtime) LogStatus

func (runtime *Runtime) LogStatus()

Jump to

Keyboard shortcuts

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