sessions

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCallValue = errors.New("no call value allowed")

Functions

func EnsureNoCallValues

func EnsureNoCallValues(v *apivalues.Value) error

func EnsureNoCallValuesInArgs

func EnsureNoCallValuesInArgs(vs []*apivalues.Value) error

func EnsureNoCallValuesInKWArgs

func EnsureNoCallValuesInKWArgs(vs map[string]*apivalues.Value) error

Types

type Config

type Config struct {
	TaskQueueName        string        `envconfig:"TASK_QUEUE_NAME" default:"sessions" json:"task_queue_name"`
	UpdateStateTimeout   time.Duration `envconfig:"UPDATE_STATE_TIMEOUT" default:"30s" json:"update_state_timeout"`
	ProgramsFetchTimeout time.Duration `envconfig:"PROGRAMS_FETCH_TIMEOUT" default:"1m" json:"programs_fetch_timeout"`
	LoadPluginsTimeout   time.Duration `envconfig:"LOAD_PLUGINS_TIMEOUT" default:"1m" json:"load_plugins_timeout"`

	// TODO: these should be variable somehow as load and call can take very long time (long running actions).
	LoadPluginTimeout time.Duration `envconfig:"LOAD_PLUGIN_TIMEOUT" default:"1h" json:"load_plugin_timeout"`
	CallPluginTimeout time.Duration `envconfig:"CALL_PLUGIN_TIMEOUT" default:"1h" json:"call_plugin_timeout"`
	HeartbeatInterval time.Duration `envconfig:"HEARTBEAT_INTERVAL" default:"3s" json:"heartbeat_interval"`
}

type Sessions

type Sessions struct {
	Config      Config
	Temporal    temporalclient.Client
	EventsStore eventsstore.Store
	Programs    *programs.Programs
	Plugins     *pluginsreg.Registry
	GetSecret   func(context.Context, apiproject.ProjectID, string) (string, error)
	GetCreds    func(context.Context, apiproject.ProjectID, string, string) ([]byte, error)
	StateStore  statestore.Store
	L           L.Nullable
	// contains filtered or unexported fields
}

func (*Sessions) Init

func (s *Sessions) Init()

func (*Sessions) Run

func (s *Sessions) Run(
	ctx workflow.Context,
	event *apievent.Event,
	project *apiproject.Project,
	srcBindingName string,
) (*apilang.RunSummary, error)

TODO: this should probably run as a child-workflow.

func (*Sessions) Start

func (s *Sessions) Start() error

Jump to

Keyboard shortcuts

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