Documentation ¶
Index ¶
- type Builtins
- type EventHandlerContext
- type Future
- type FutureType
- func (f *FutureType) CallInternal(thread *starlark.Thread, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
- func (f *FutureType) Freeze()
- func (f *FutureType) Hash() (uint32, error)
- func (f *FutureType) Name() string
- func (f *FutureType) String() string
- func (f *FutureType) Truth() starlark.Bool
- func (f *FutureType) Type() string
- func (f *FutureType) Unwrap() any
- type HTTPResponse
- type ModuleRef
- type ModuleSource
- type PreloadedRuntimeOptions
- type ReceiveChannel
- type ReceiveChannelType
- func (c *ReceiveChannelType) Attr(name string) (starlark.Value, error)
- func (c *ReceiveChannelType) AttrNames() []string
- func (c *ReceiveChannelType) Freeze()
- func (c *ReceiveChannelType) Hash() (uint32, error)
- func (c *ReceiveChannelType) String() string
- func (c *ReceiveChannelType) Truth() starlark.Bool
- func (c *ReceiveChannelType) Type() string
- func (c *ReceiveChannelType) Unwrap() any
- type Runtime
- type RuntimeOptions
- type Source
- type TestingSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandlerContext ¶
type EventHandlerContext interface { HTTPDo(reqURL string, method string, query url.Values, header http.Header, body []byte) (*HTTPResponse, error) Select(cases *starlark.Dict, defaultCase starlark.Value, timeout startime.Duration, timeoutValue starlark.Value) (starlark.Value, error) Signal(workflowID string, signalName string, payloadJSON starlark.Value, runID string) (starlark.Value, error) SignalChannel(signalName string) ReceiveChannel Sleep(duration startime.Duration) (starlark.Value, error) Timer(duration startime.Duration) Future }
TODO: eventually abstract starlark types away ... maybe?!
type FutureType ¶
type FutureType struct {
// contains filtered or unexported fields
}
func (*FutureType) CallInternal ¶
func (*FutureType) Freeze ¶
func (f *FutureType) Freeze()
func (*FutureType) Hash ¶
func (f *FutureType) Hash() (uint32, error)
func (*FutureType) Name ¶
func (f *FutureType) Name() string
func (*FutureType) String ¶
func (f *FutureType) String() string
func (*FutureType) Truth ¶
func (f *FutureType) Truth() starlark.Bool
func (*FutureType) Type ¶
func (f *FutureType) Type() string
func (*FutureType) Unwrap ¶
func (f *FutureType) Unwrap() any
type HTTPResponse ¶ added in v17.4.0
type ModuleRef ¶
type ModuleSource ¶ added in v17.4.0
type PreloadedRuntimeOptions ¶ added in v17.4.0
type PreloadedRuntimeOptions struct { ProjectPath string Entrypoint string Builtins Builtins Modules []ModuleSource }
type ReceiveChannel ¶
type ReceiveChannelType ¶
type ReceiveChannelType struct {
// contains filtered or unexported fields
}
func (*ReceiveChannelType) Attr ¶
func (c *ReceiveChannelType) Attr(name string) (starlark.Value, error)
func (*ReceiveChannelType) AttrNames ¶
func (c *ReceiveChannelType) AttrNames() []string
func (*ReceiveChannelType) Freeze ¶
func (c *ReceiveChannelType) Freeze()
func (*ReceiveChannelType) Hash ¶
func (c *ReceiveChannelType) Hash() (uint32, error)
func (*ReceiveChannelType) String ¶
func (c *ReceiveChannelType) String() string
func (*ReceiveChannelType) Truth ¶
func (c *ReceiveChannelType) Truth() starlark.Bool
func (*ReceiveChannelType) Type ¶
func (c *ReceiveChannelType) Type() string
func (*ReceiveChannelType) Unwrap ¶
func (c *ReceiveChannelType) Unwrap() any
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntimeFromPreloadedSource ¶ added in v17.4.0
func NewRuntimeFromPreloadedSource(ctx context.Context, opts PreloadedRuntimeOptions) (*Runtime, error)
func NewRuntimeFromSource ¶
func NewRuntimeFromSource(ctx context.Context, opts RuntimeOptions) (*Runtime, error)
func (*Runtime) EvaluateEventHandlerIds ¶
func (*Runtime) Execute ¶
func (r *Runtime) Execute(eventType string, eventHandlerID uint32, ctx EventHandlerContext, vars starlark.StringDict, event *starlark.Dict) error
func (*Runtime) LoadedModules ¶ added in v17.4.0
func (r *Runtime) LoadedModules() []ModuleSource
type RuntimeOptions ¶
type Source ¶
type Source interface { // SetupThreadLocal configures thread local variables for this source. // projectPath is GitLab project path of the entrypoint project. SetupThreadLocal(thread *starlark.Thread, projectPath string) // RecordSource // fullGitRef is the full git reference: // - refs/heads/<name> for branches // - refs/tags/<name> for tags // - <commit id> for commits // - empty string or HEAD to use the default branch. RecordSource(thread *starlark.Thread, name, projectPath, fullGitRef string) error LoadFile(ctx context.Context, thread *starlark.Thread, ref ModuleRef) ([]byte, error) }
type TestingSource ¶ added in v17.4.0
type TestingSource = preloadedSource
func NewTestingSource ¶ added in v17.4.0
func NewTestingSource(modules []ModuleSource) *TestingSource
Click to show internal directories.
Click to hide internal directories.