store

package
v0.22.0-beta Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 32 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentSecrets

type ComponentSecrets map[string]map[string]any

ComponentSecrets contains the global config secrets of each implemented component (referenced by ID). Components may use these secrets to skip the component configuration step and have a ready-to-run config.

type Store

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

Store holds in-memory information about the initialized components.

func Init

func Init(
	logger *zap.Logger,
	secrets ComponentSecrets,
	usageHandlerCreator base.UsageHandlerCreator,
) *Store

Init initializes the components implemented in this repository and loads their information to memory.

func (*Store) CreateExecution

func (s *Store) CreateExecution(defUID uuid.UUID, sysVars map[string]any, setup *structpb.Struct, task string) (*base.ExecutionWrapper, error)

CreateExecution initializes the execution of a component given its UID.

func (*Store) GetDefinitionByID

func (s *Store) GetDefinitionByID(defID string, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)

GetDefinitionByID returns a component definition by its ID.

func (*Store) GetDefinitionByUID

func (s *Store) GetDefinitionByUID(defUID uuid.UUID, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)

GetDefinitionByUID returns a component definition by its UID.

func (*Store) Import

func (s *Store) Import(comp base.IComponent)

Import loads the component definitions into memory.

func (*Store) IsSecretField

func (s *Store) IsSecretField(defUID uuid.UUID, target string) (bool, error)

func (*Store) ListDefinitions

func (s *Store) ListDefinitions(sysVars map[string]any, returnTombstone bool) []*pb.ComponentDefinition

ListDefinitions returns all the loaded component definitions.

Jump to

Keyboard shortcuts

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