core

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationStore

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

ApplicationStore describes in memory store for applications

func NewApplicationStore

func NewApplicationStore() *ApplicationStore

NewApplicationStore returns an in-memory application store instance

func (*ApplicationStore) Add

Add adds a new application, based on the Application structure provided as argument

func (*ApplicationStore) Delete

func (as *ApplicationStore) Delete(ctx context.Context, name string) error

Delete deletes the application registered by FuseML

func (*ApplicationStore) Find

Find returns a application identified by id

func (*ApplicationStore) GetAll

func (as *ApplicationStore) GetAll(ctx context.Context, applicationType *string, applicationWorkflow *string) ([]*domain.Application, error)

GetAll returns all applications of a given type. If type is not specified, return all applications.

type GitAdmin

type GitAdmin interface {
	PrepareRepository(*domain.Codeset, *string) error
	CreateRepoWebhook(string, string, *string) error
	GetRepositories(org, label *string) ([]*domain.Codeset, error)
	GetRepository(org, name string) (*domain.Codeset, error)
	DeleteRepository(org, name string) error
}

GitAdmin is an inteface to git administration clients

type GitCodesetStore

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

GitCodesetStore describes a stucture that accesses codeset store implemented in git

func NewGitCodesetStore

func NewGitCodesetStore(gitAdmin GitAdmin) *GitCodesetStore

NewGitCodesetStore returns codeset store instance

func (*GitCodesetStore) Add

Add creates new codeset

func (*GitCodesetStore) CreateWebhook

func (cs *GitCodesetStore) CreateWebhook(ctx context.Context, c *domain.Codeset, listenerURL string) error

CreateWebhook adds a new webhook to a codeset

func (*GitCodesetStore) Delete

func (cs *GitCodesetStore) Delete(ctx context.Context, project, name string) error

Delete removes a codeset identified by project and name

func (*GitCodesetStore) Find

func (cs *GitCodesetStore) Find(ctx context.Context, project, name string) (*domain.Codeset, error)

Find returns a codeset identified by project and name

func (*GitCodesetStore) GetAll

func (cs *GitCodesetStore) GetAll(ctx context.Context, project, label *string) ([]*domain.Codeset, error)

GetAll returns all codesets matching given project and label

type RunnableStore

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

RunnableStore describes in memory store for runnables

func NewRunnableStore

func NewRunnableStore() *RunnableStore

NewRunnableStore creates and returns an in-memory runnable store instance

func (*RunnableStore) Find

func (s *RunnableStore) Find(ctx context.Context, id string, kind string, labels map[string]string) (res []*domain.Runnable, err error)

Find returns a list of runnables matching the input query. Runnables may be matched by id, kind or labels. Only runnables that match all the supplied criteria will be returned.

func (*RunnableStore) Get

func (s *RunnableStore) Get(ctx context.Context, id string) (res *domain.Runnable, err error)

Get returns a runnable identified by id

func (*RunnableStore) Register

func (s *RunnableStore) Register(ctx context.Context, r *domain.Runnable) (res *domain.Runnable, err error)

Register adds a new runnable, based on the Runnable structure provided as argument

type WorkflowStore

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

WorkflowStore describes in memory store for workflows

func NewWorkflowStore

func NewWorkflowStore() *WorkflowStore

NewWorkflowStore returns an in-memory workflow store instance

func (*WorkflowStore) Add

Add adds a new workflow, based on the Workflow structure provided as argument

func (*WorkflowStore) Find

func (ws *WorkflowStore) Find(ctx context.Context, name string) *workflow.Workflow

Find returns a workflow identified by id

func (*WorkflowStore) GetAll

func (ws *WorkflowStore) GetAll(ctx context.Context, name string) (result []*workflow.Workflow)

GetAll returns all workflows that matches a given name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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