domain

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ECSGlobal is a global scope indicating that credentials may be used for any project and user
	ECSGlobal ExtensionServiceCredentialsScope = "global"
	// ECSProject is a project scope indicating that credentials may only be used in the context of
	// a controlled list of projects
	ECSProject = "project"
	// ECSUser is a user scope indicating that credentials may only be used in the context of
	// a controlled list of users and projects
	ECSUser = "user"
)

Valid values that can be used with ExtensionCredentialScope

View Source
const (
	RKCustom    RunnableKind = "custom"
	RKBuilder                = "builder"
	RKTrainer                = "trainer"
	RKPredictor              = "predictor"
)

Valid values that can be used with RunnableKind

View Source
const (
	APLocal  ArtifactProvider = "local"
	APInline                  = "inline"
	APFuseml                  = "fuseml"
	APS3                      = "s3"
	APGCS                     = "gcs"
	APAzure                   = "azure"
	APGIT                     = "git"
	APNFS                     = "nfs"
	APFTP                     = "ftp"
	APSFTP                    = "sftp"
	APHTTP                    = "http"
	APHTTPS                   = "https"
	APHDFS                    = "hdfs"
	APOCI                     = "oci"
)

Valid values that can be used with ArtifactProvider

View Source
const (
	// ErrWorkflowExists describes the error message returned when trying to create a workflow with that already exists.
	ErrWorkflowExists = WorkflowErr("workflow already exists")
	// ErrWorkflowNotFound describes the error message returned when trying to get a workflow that does not exist.
	ErrWorkflowNotFound = WorkflowErr("could not find a workflow with the specified name")
	// ErrWorkflowNotAssignedToCodeset describes the error message returned when trying to unassign a workflow from a codeset
	// but it is not assigned to the codeset.
	ErrWorkflowNotAssignedToCodeset = WorkflowErr("workflow not assigned to codeset")
	// ErrCannotDeleteAssignedWorkflow describes the error message returned when trying to delete a workflow that is assigned to a codeset.
	ErrCannotDeleteAssignedWorkflow = WorkflowErr("cannot delete workflow, there are codesets assigned to it")
)
View Source
const (
	// ErrProjectExists is the error message returned when trying to create a project (org) that already exists.
	ErrProjectExists = projectErr("Project with that name already exists")
)
View Source
const (
	// LocalRegistryHostname - Container image location values may use this identifier as a hostname to indicate
	// that they are stored internally in the local OCI registry managed by fuseml
	LocalRegistryHostname = "fuseml.local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// The name of the Application
	Name string
	// The type of the Application
	Type string
	// Application description
	Description string
	// The public URL for accessing the Application
	URL string
	// Name of the Workflow used to create Application
	Workflow string
	// Kubernetes resources describing the Application
	K8sResources []*KubernetesResource
	// Kubernetes namespace where the resources are located
	K8sNamespace string
}

Application holds the information about the application

type ApplicationStore

type ApplicationStore interface {
	Find(context.Context, string) *Application
	GetAll(context.Context, *string, *string) ([]*Application, error)
	Add(context.Context, *Application) (*Application, error)
	Delete(context.Context, string) error
}

ApplicationStore is an inteface to application stores

type ArtifactProvider

type ArtifactProvider string

ArtifactProvider encodes valid values that can be assigned to the RunnableArtifactArgDesc.Provider field

type Codeset

type Codeset struct {
	// The name of the Codeset
	Name string
	// The project this Codeset belongs to
	Project string
	// Codeset description
	Description string
	// Additional Codeset labels that helps with identifying the type
	Labels []string
	// Full URL to the Codeset
	URL string
}

Codeset represents a codeset artifact

type CodesetAssignment added in v0.2.1

type CodesetAssignment struct {
	// Codeset is a reference to the codeset.
	Codeset *Codeset
	// WebhookID is the ID of the webhook that is used by the workflow assignment.
	WebhookID *int64
}

CodesetAssignment describes a codeset that has a workflow assigned to it through its webhook ID.

type CodesetStore

type CodesetStore interface {
	Find(ctx context.Context, project, name string) (*Codeset, error)
	GetAll(ctx context.Context, project, label *string) ([]*Codeset, error)
	Add(ctx context.Context, c *Codeset) (*Codeset, *string, *string, error)
	CreateWebhook(context.Context, *Codeset, string) (*int64, error)
	DeleteWebhook(context.Context, *Codeset, *int64) error
	Delete(ctx context.Context, project, name string) error
	Subscribe(ctx context.Context, watcher CodesetSubscriber, codeset *Codeset) error
	Unsubscribe(ctx context.Context, watcher CodesetSubscriber, codeset *Codeset) error
}

CodesetStore is an interface to codeset stores

type CodesetSubscriber added in v0.2.1

type CodesetSubscriber interface {
	OnDeletingCodeset(ctx context.Context, c *Codeset)
}

CodesetSubscriber is an interface for objects interested in operations performed on a specific codeset

type ErrExtensionExists added in v0.2.1

type ErrExtensionExists string

ErrExtensionExists is the error returned during registration, when an extension with the same ID already exists in the registry

func NewErrExtensionExists added in v0.2.1

func NewErrExtensionExists(extensionID string) *ErrExtensionExists

NewErrExtensionExists creates a new ErrExtensionExists error

func (*ErrExtensionExists) Error added in v0.2.1

func (e *ErrExtensionExists) Error() string

type ErrExtensionNotFound added in v0.2.1

type ErrExtensionNotFound string

ErrExtensionNotFound is the error returned by various registry methods when an extension with a given ID is not found in the registry

func NewErrExtensionNotFound added in v0.2.1

func NewErrExtensionNotFound(extensionID string) *ErrExtensionNotFound

NewErrExtensionNotFound creates a new ErrExtensionNotFound error

func (*ErrExtensionNotFound) Error added in v0.2.1

func (e *ErrExtensionNotFound) Error() string

type ErrExtensionServiceCredentialsExists added in v0.2.1

type ErrExtensionServiceCredentialsExists struct {
	ExtensionID   string
	ServiceID     string
	CredentialsID string
}

ErrExtensionServiceCredentialsExists is the error returned during registration or credential addition, when a set of extension credentials with the same ID already exists under the parent extension service

func NewErrExtensionServiceCredentialsExists added in v0.2.1

func NewErrExtensionServiceCredentialsExists(extensionID, serviceID, credentialsID string) *ErrExtensionServiceCredentialsExists

NewErrExtensionServiceCredentialsExists creates a new ErrExtensionCredentialsExists error

func (*ErrExtensionServiceCredentialsExists) Error added in v0.2.1

type ErrExtensionServiceCredentialsNotFound added in v0.2.1

type ErrExtensionServiceCredentialsNotFound struct {
	ExtensionID   string
	ServiceID     string
	CredentialsID string
}

ErrExtensionServiceCredentialsNotFound is the error returned by various registry methods when a set of extension credentials with a given ID is not found under an extension service

func NewErrExtensionServiceCredentialsNotFound added in v0.2.1

func NewErrExtensionServiceCredentialsNotFound(extensionID, serviceID, credentialsID string) *ErrExtensionServiceCredentialsNotFound

NewErrExtensionServiceCredentialsNotFound creates a new ErrExtensionCredentialsNotFound error

func (*ErrExtensionServiceCredentialsNotFound) Error added in v0.2.1

type ErrExtensionServiceEndpointExists added in v0.2.1

type ErrExtensionServiceEndpointExists struct {
	ExtensionID string
	ServiceID   string
	URL         string
}

ErrExtensionServiceEndpointExists is the error returned during registration or endpoint addition, when an extension endpoint with the same URL already exists under the parent extension service

func NewErrExtensionServiceEndpointExists added in v0.2.1

func NewErrExtensionServiceEndpointExists(extensionID, serviceID, URL string) *ErrExtensionServiceEndpointExists

NewErrExtensionServiceEndpointExists creates a new ErrExtensionEndpointExists error

func (*ErrExtensionServiceEndpointExists) Error added in v0.2.1

type ErrExtensionServiceEndpointNotFound added in v0.2.1

type ErrExtensionServiceEndpointNotFound struct {
	ExtensionID string
	ServiceID   string
	URL         string
}

ErrExtensionServiceEndpointNotFound is the error returned by various registry methods when an extension endpoint with a given URL is not found under an extension service

func NewErrExtensionServiceEndpointNotFound added in v0.2.1

func NewErrExtensionServiceEndpointNotFound(extensionID, serviceID, URL string) *ErrExtensionServiceEndpointNotFound

NewErrExtensionServiceEndpointNotFound creates a new ErrExtensionEndpointNotFound error

func (*ErrExtensionServiceEndpointNotFound) Error added in v0.2.1

type ErrExtensionServiceExists added in v0.2.1

type ErrExtensionServiceExists struct {
	ExtensionID string
	ServiceID   string
}

ErrExtensionServiceExists is the error returned during registration or service addition, when an extension service with the same ID already exists under the parent extension

func NewErrExtensionServiceExists added in v0.2.1

func NewErrExtensionServiceExists(extensionID, serviceID string) *ErrExtensionServiceExists

NewErrExtensionServiceExists creates a new ErrExtensionServiceExists error

func (*ErrExtensionServiceExists) Error added in v0.2.1

func (e *ErrExtensionServiceExists) Error() string

type ErrExtensionServiceNotFound added in v0.2.1

type ErrExtensionServiceNotFound struct {
	ExtensionID string
	ServiceID   string
}

ErrExtensionServiceNotFound is the error returned by various registry methods when an extension service with a given ID is not found under an extension

func NewErrExtensionServiceNotFound added in v0.2.1

func NewErrExtensionServiceNotFound(extensionID, serviceID string) *ErrExtensionServiceNotFound

NewErrExtensionServiceNotFound creates a new ErrExtensionServiceNotFound error

func (*ErrExtensionServiceNotFound) Error added in v0.2.1

type ErrMissingField added in v0.2.1

type ErrMissingField struct {
	Element string
	Field   string
}

ErrMissingField is the error returned by various registry methods if a required field has not been filled in the supplied object

func NewErrMissingField added in v0.2.1

func NewErrMissingField(element, field string) *ErrMissingField

NewErrMissingField creates a new ErrMissingField error

func (*ErrMissingField) Error added in v0.2.1

func (e *ErrMissingField) Error() string

type Extension added in v0.2.1

type Extension struct {
	// Extension ID - used to uniquely identify an extension in the registry
	ID string
	// Universal product identifier that can be used to group and identify extensions according to the product
	// they belong to. Product values can be used to identify installations of the same product registered
	// with the same or different FuseML servers.
	Product string
	// Optional extension version. To support semantic version operations, such as matching lookup operations
	// that include a version requirement specifier, it should be formatted as [v]MAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]]
	Version string
	// Optional extension description
	Description string
	// Optional zone identifier. Can be used to group and lookup extensions according to the infrastructure
	// location / zone / area / domain where they are installed (e.g. kubernetes cluster).
	// Is used to automatically select between cluster-local and external endpoints when
	// running queries.
	Zone string
	// Configuration entries (e.g. configuration values required to configure all clients that connect to
	// this extension), expressed as set of key-value entries
	Configuration map[string]string
	// The time when the extension was registered
	Created time.Time
	// The time when the extension was last updated
	Updated time.Time
	// Services is a list of services that are part of this extension
	Services map[string]*ExtensionService
}

Extension is an entry in the extension registry that describes a particular installation of a framework/platform/service/product developed and released or hosted under a unique product name

func (*Extension) AddCredentials added in v0.2.1

func (e *Extension) AddCredentials(serviceID string, credential *ExtensionServiceCredentials) (*ExtensionServiceCredentials, error)

AddCredentials adds a new credential to a service.

func (*Extension) AddEndpoint added in v0.2.1

func (e *Extension) AddEndpoint(serviceID string, endpoint *ExtensionServiceEndpoint) (*ExtensionServiceEndpoint, error)

AddEndpoint adds a new endpoint to a service.

func (*Extension) AddService added in v0.2.1

func (e *Extension) AddService(service *ExtensionService) (*ExtensionService, error)

AddService adds a new service to the extension.

func (*Extension) DeleteService added in v0.2.1

func (e *Extension) DeleteService(serviceID string) error

DeleteService deletes a service from the extension.

func (*Extension) DeleteServiceCredentials added in v0.2.1

func (e *Extension) DeleteServiceCredentials(serviceID string, credentialsID string) error

DeleteServiceCredentials deletes a credential from a service.

func (*Extension) DeleteServiceEndpoint added in v0.2.1

func (e *Extension) DeleteServiceEndpoint(serviceID string, endpointID string) error

DeleteServiceEndpoint deletes an endpoint from a service.

func (*Extension) EnsureID added in v0.2.1

func (e *Extension) EnsureID(ctx context.Context, store ExtensionStore)

EnsureID sets the ID of the extension when not set.

func (*Extension) FindServices added in v0.2.1

func (e *Extension) FindServices(query *ExtensionQuery) (map[string]*ExtensionService, error)

FindServices returns services belonging to the extension that match the query.

func (*Extension) GetAccessDescriptors added in v0.2.1

func (e *Extension) GetAccessDescriptors() []*ExtensionAccessDescriptor

GetAccessDescriptors returns access descriptors for the extension.

func (*Extension) GetExtensionIfMatch added in v0.2.1

func (e *Extension) GetExtensionIfMatch(query *ExtensionQuery) *Extension

GetExtensionIfMatch returns an extension where the extension, services, endpoints and credentials match the given query.

func (*Extension) GetService added in v0.2.1

func (e *Extension) GetService(serviceID string) (*ExtensionService, error)

GetService returns a service belonging to the extension.

func (*Extension) GetServiceCredentials added in v0.2.1

func (e *Extension) GetServiceCredentials(serviceID string, credentialsID string) (*ExtensionServiceCredentials, error)

GetServiceCredentials returns a credential belonging to a service.

func (*Extension) GetServiceEndpoint added in v0.2.1

func (e *Extension) GetServiceEndpoint(serviceID string, endpointID string) (*ExtensionServiceEndpoint, error)

GetServiceEndpoint returns an endpoint belonging to a service.

func (*Extension) ListServiceCredentials added in v0.2.1

func (e *Extension) ListServiceCredentials(serviceID string) ([]*ExtensionServiceCredentials, error)

ListServiceCredentials returns all credentials belonging to a service.

func (*Extension) ListServiceEndpoints added in v0.2.1

func (e *Extension) ListServiceEndpoints(serviceID string) ([]*ExtensionServiceEndpoint, error)

ListServiceEndpoints returns all endpoints belonging to a service.

func (*Extension) ListServices added in v0.2.1

func (e *Extension) ListServices() []*ExtensionService

ListServices returns all services belonging to the extension.

func (*Extension) SetCreated added in v0.2.1

func (e *Extension) SetCreated(ctx context.Context)

SetCreated sets the created time of the extension and its services, credentials, endpoints.

func (*Extension) UpdateService added in v0.2.1

func (e *Extension) UpdateService(newService *ExtensionService) error

UpdateService updates a service from the extension.

func (*Extension) UpdateServiceCredentials added in v0.2.1

func (e *Extension) UpdateServiceCredentials(serviceID string, credentials *ExtensionServiceCredentials) error

UpdateServiceCredentials updates a credential from a service.

func (*Extension) UpdateServiceEndpoint added in v0.2.1

func (e *Extension) UpdateServiceEndpoint(serviceID string, endpoint *ExtensionServiceEndpoint) error

UpdateServiceEndpoint updates an endpoint from a service.

type ExtensionAccessDescriptor added in v0.2.1

type ExtensionAccessDescriptor struct {
	Extension   Extension
	Service     ExtensionService
	Endpoint    ExtensionServiceEndpoint
	Credentials *ExtensionServiceCredentials
}

ExtensionAccessDescriptor is a structure that contains all the information needed to access an extension: a service, an endpoint and an optional set of credentials. It's returned as result when running access queries against the extension registry.

type ExtensionQuery added in v0.2.1

type ExtensionQuery struct {
	// Search by explicit extension ID
	ExtensionID string
	// Search by product name. Leave empty to include all products
	Product string
	// Search by version or by semantic version constraints. Leave empty to include all available versions
	VersionConstraints string
	// Match extensions installed in a given zone.
	Zone string
	// Use strict filtering when a zone query field is supplied. When set, only extensions
	// installed in the supplied zone are returned.
	StrictZoneMatch bool
	// Search by explicit service ID
	ServiceID string
	// Search by service resource type. Leave empty to include all resource types
	ServiceResource string
	// Search by service category. Leave empty to include all services
	ServiceCategory string
	// Search by explicit endpoint URL
	EndpointURL string
	// Search by endpoint type. If not explicitly specified, the endpoint type will be
	// determined automatically by StrictZoneMatch and the Zone value, if a Zone is supplied:
	//  - if the extension is in the same zone as the query, both internal and external endpoints will match
	//  - otherwise, only external endpoints will match
	Type *ExtensionServiceEndpointType
	// Search by explicit credentials ID
	CredentialsID string
	// Match credentials by scope
	CredentialsScope ExtensionServiceCredentialsScope
	// Match credentials allowed for a given user. CredentialsScope must be set to ECSUser
	// for this to have effect
	User string
	// Match credentials allowed for a given project. CredentialsScope must be set to ECSUser
	// or ECSProject for this to have effect
	Project string
}

ExtensionQuery is a query that can be run against the extension registry to retrieve a list of extension endpoints and credentials that meet all supplied criteria

type ExtensionRegistry added in v0.2.1

type ExtensionRegistry interface {
	// Register a new extension, with all participating services, endpoints and credentials
	RegisterExtension(ctx context.Context, extension *Extension) (*Extension, error)
	// Add a service to an existing extension
	AddService(ctx context.Context, extensionID string, service *ExtensionService) (*ExtensionService, error)
	// Add an endpoint to an existing extension service
	AddEndpoint(ctx context.Context, extensionID string, serviceID string, endpoint *ExtensionServiceEndpoint) (*ExtensionServiceEndpoint, error)
	// Add a set of credentials to an existing extension service
	AddCredentials(ctx context.Context, extensionID string, serviceID string, credentials *ExtensionServiceCredentials) (*ExtensionServiceCredentials, error)
	// List all registered extensions that match the supplied query parameters
	ListExtensions(ctx context.Context, query *ExtensionQuery) (result []*Extension, err error)
	// Retrieve an extension by ID and, optionally, its entire service/endpoint/credentials subtree
	GetExtension(ctx context.Context, extensionID string) (*Extension, error)
	// Retrieve an extension service by ID and, optionally, its entire endpoint/credentials subtree
	GetService(ctx context.Context, extensionID, serviceID string) (*ExtensionService, error)
	// Retrieve an extension endpoint by ID
	GetEndpoint(ctx context.Context, extensionID, serviceID, endpointURL string) (*ExtensionServiceEndpoint, error)
	// Retrieve a set of extension credentials by ID
	GetCredentials(ctx context.Context, extensionID, serviceID, credentialsID string) (*ExtensionServiceCredentials, error)
	// Update an extension
	UpdateExtension(ctx context.Context, extension *Extension) error
	// Update a service belonging to an extension
	UpdateService(ctx context.Context, extensionID string, service *ExtensionService) error
	// Update an endpoint belonging to a service
	UpdateEndpoint(ctx context.Context, extensionID string, serviceID string, endpoint *ExtensionServiceEndpoint) error
	// Update a set of credentials belonging to a service
	UpdateCredentials(ctx context.Context, extensionID string, serviceID string, credentials *ExtensionServiceCredentials) error
	// Remove an extension from the registry, along with all its services, endpoints and credentials
	RemoveExtension(ctx context.Context, extensionID string) error
	// Remove an extension service from the registry, along with all its endpoints and credentials
	RemoveService(ctx context.Context, extensionID, serviceID string) error
	// Remove an extension endpoint from the registry
	RemoveEndpoint(ctx context.Context, extensionID, serviceID, endpointID string) error
	// Remove a set of extension credentials from the registry
	RemoveCredentials(ctx context.Context, extensionID, serviceID, credentialsID string) error
	// Run a query on the extension registry to find one or more ways to access extensions matching given search parameters
	GetExtensionAccessDescriptors(ctx context.Context, query *ExtensionQuery) ([]*ExtensionAccessDescriptor, error)
}

ExtensionRegistry defines the public interface implemented by the extension registry

type ExtensionService added in v0.2.1

type ExtensionService struct {
	// Extension service ID - used to uniquely identify an extension service in the registry
	ID string
	// Universal service identifier that can be used to identify a service in any FuseML installation.
	// This identifier should uniquely identify the API or protocol (e.g. s3, git, mlflow) that the service
	// provides.
	Resource string
	// Universal service category. Used to classify services into well-known categories of AI/ML services
	// (e.g. model store, feature store, distributed training, serving).
	Category string
	// Optional extension service description
	Description string
	// Marks a service for which authentication is required. If set, a set of credentials is required
	// to access the service; if none of the provided credentials match the scope of the consumer,
	// this service will be excluded from queries
	AuthRequired bool
	// Configuration entries (e.g. configuration values required to configure the client to access this
	// service), expressed as set of key-value entries
	Configuration map[string]string
	// The time when the service was registered
	Created time.Time
	// The time when the service was last updated
	Updated time.Time
	// Endpoints is a list of endpoints that are part of this extension service
	Endpoints map[string]*ExtensionServiceEndpoint
	// Credentials is a list of credentials that are part of this extension service
	Credentials map[string]*ExtensionServiceCredentials
}

ExtensionService is a service provided by an extension. A service is represented by a single API or UI. For extensions implemented as cloud-native applications, a service is the equivalent of a kubernetes service that is used to expose a public API or UI. Services are classified into known resource types (e.g. s3, git) encoded via the Resource attribute and service categories (e.g. model store, feature store, distributed training, serving) via the Category attribute

func (*ExtensionService) AddCredentials added in v0.2.1

AddCredentials adds the given credential to the service.

func (*ExtensionService) AddEndpoint added in v0.2.1

AddEndpoint adds the given endpoint to the service.

func (*ExtensionService) DeleteCredentials added in v0.2.1

func (es *ExtensionService) DeleteCredentials(credentialsID string) error

DeleteCredentials deletes a credential from the service.

func (*ExtensionService) DeleteEndpoint added in v0.2.1

func (es *ExtensionService) DeleteEndpoint(endpointID string) error

DeleteEndpoint deletes an endpoint from the service.

func (*ExtensionService) EnsureID added in v0.2.1

func (es *ExtensionService) EnsureID(ext *Extension)

EnsureID sets the ID of the service when empty.

func (*ExtensionService) FindCredentials added in v0.2.1

func (es *ExtensionService) FindCredentials(query *ExtensionQuery) (map[string]*ExtensionServiceCredentials, error)

FindCredentials returns all credentials matching the given query.

func (*ExtensionService) FindEndpoints added in v0.2.1

func (es *ExtensionService) FindEndpoints(extensionZone string, query *ExtensionQuery) (map[string]*ExtensionServiceEndpoint, error)

FindEndpoints returns all endpoints matching the given query.

func (*ExtensionService) GetCredentials added in v0.2.1

func (es *ExtensionService) GetCredentials(credentialsID string) (*ExtensionServiceCredentials, error)

GetCredentials returns the credential with the given ID.

func (*ExtensionService) GetEndpoint added in v0.2.1

func (es *ExtensionService) GetEndpoint(endpointID string) (*ExtensionServiceEndpoint, error)

GetEndpoint returns the endpoint with the given ID.

func (*ExtensionService) ListCredentials added in v0.2.1

func (es *ExtensionService) ListCredentials() []*ExtensionServiceCredentials

ListCredentials returns all credentials belonging to the service.

func (*ExtensionService) ListEndpoints added in v0.2.1

func (es *ExtensionService) ListEndpoints() []*ExtensionServiceEndpoint

ListEndpoints returns all endpoints belonging to the service.

func (*ExtensionService) SetCreated added in v0.2.1

func (es *ExtensionService) SetCreated(date time.Time)

SetCreated sets the created time of the extension service, endpoint and credentials.

func (*ExtensionService) UpdateCredentials added in v0.2.1

func (es *ExtensionService) UpdateCredentials(newCredentials *ExtensionServiceCredentials) error

UpdateCredentials updates a credential in the service.

func (*ExtensionService) UpdateEndpoint added in v0.2.1

func (es *ExtensionService) UpdateEndpoint(newEndpoint *ExtensionServiceEndpoint) error

UpdateEndpoint updates an endpoint in the service.

type ExtensionServiceCredentials added in v0.2.1

type ExtensionServiceCredentials struct {
	// Extension credentials ID - used to uniquely identify a set of credentials in the registry
	ID string
	// The scope associated with this set of credentials. Global scoped credentials can be used by any
	// user/project. Project scoped credentials can be used only in the context of one of the projects
	// supplied in the Projects list. User scoped credentials can only be used by the users in the Users
	// list and, optionally, in the context of the projects supplied in the Projects list.
	Scope ExtensionServiceCredentialsScope
	// Use as default credentials. Used to automatically select one of several credentials with the same
	// scope matching the same query.
	Default bool
	// List of projects allowed to use these credentials
	Projects []string
	// List of users allowed to use these credentials
	Users []string
	// Configuration entries (e.g. usernames, passwords, tokens, keys), expressed as set of key-value entries
	Configuration map[string]string
	// The time when the credential set was created
	Created time.Time
	// The time when the credential set was last updated
	Updated time.Time
}

ExtensionServiceCredentials is a group of configuration values that can be generally used to embed information pertaining to the authentication and authorization features supported by a service. This descriptor allows administrators and operators of 3rd party tools integrated with FuseML to configure different accounts and credentials (tokens, certificates, passwords etc.) to be associated with different FuseML organization entities (users, projects, groups etc.). All information embedded in a credentials descriptor entry is treated as sensitive information. Each credentials entry has an associated scope that controls who has access to this information (e.g. global, project, user, workflow). This is the equivalent of a k8s secret.

func (*ExtensionServiceCredentials) EnsureID added in v0.2.1

func (ec *ExtensionServiceCredentials) EnsureID(svc *ExtensionService)

EnsureID sets the ID of the credential if empty.

type ExtensionServiceCredentialsScope added in v0.2.1

type ExtensionServiceCredentialsScope string

ExtensionServiceCredentialsScope is the type used for the ExtensionServiceCredentials Scope field

type ExtensionServiceEndpoint added in v0.2.1

type ExtensionServiceEndpoint struct {
	// Endpoint URL. In case of k8s controllers and operators, the URL points to the cluster API.
	// Also used to uniquely identifies an endpoint within the scope of a service
	URL string
	// Endpoint type - internal/external. An internal endpoint can only be accessed when the consumer
	// is located in the same zone as the extension service
	Type ExtensionServiceEndpointType
	// Configuration entries (e.g. CA certificates), expressed as set of key-value entries
	Configuration map[string]string
	// The time when the extension was registered
	Created time.Time
	// The time when the extension was last updated
	Updated time.Time
}

ExtensionServiceEndpoint is an endpoint through which an extension service can be accessed. Having a list of endpoints associated with a single extension service is particularly important for representing k8s services, which can be exposed both internally (cluster IP) and externally (e.g. ingress). All endpoints belonging to the same extension service must be equivalent in the sense that they are backed by the same API and/or protocol and exhibit the same behavior

type ExtensionServiceEndpointType added in v0.2.1

type ExtensionServiceEndpointType string

ExtensionServiceEndpointType is the type used for the ExtensionServiceEndpoint Type field

const (
	// EETInternal is an internal endpoint that can only be accessed from the same zone
	EETInternal ExtensionServiceEndpointType = "internal"
	// EETExternal is an external endpoint that can be accessed from any zone
	EETExternal = "external"
)

Valid values that can be used with ExtensionServiceEndpointType

type ExtensionStore added in v0.2.1

type ExtensionStore interface {
	// AddExtension adds a new extension to the store.
	AddExtension(ctx context.Context, extension *Extension) (*Extension, error)
	// GetExtension retrieves an extension by its ID.
	GetExtension(ctx context.Context, extensionID string) (*Extension, error)
	// ListExtensions retrieves all stored extensions.
	ListExtensions(ctx context.Context, query *ExtensionQuery) []*Extension
	// UpdateExtension updates an existing extension.
	UpdateExtension(ctx context.Context, newExtension *Extension) error
	// DeleteExtension deletes an extension from the store.
	DeleteExtension(ctx context.Context, extensionID string) error
	// AddExtensionService adds a new extension service to an extension.
	AddExtensionService(ctx context.Context, extensionID string, service *ExtensionService) (*ExtensionService, error)
	// GetExtensionService retrieves an extension service by its ID.
	GetExtensionService(ctx context.Context, extensionID string, serviceID string) (*ExtensionService, error)
	// ListExtensionServices retrieves all services belonging to an extension.
	ListExtensionServices(ctx context.Context, extensionID string) ([]*ExtensionService, error)
	// UpdateExtensionService updates a service belonging to an extension.
	UpdateExtensionService(ctx context.Context, extensionID string, newService *ExtensionService) error
	// DeleteExtensionService deletes an extension service from an extension.
	DeleteExtensionService(ctx context.Context, extensionID, serviceID string) error
	// AddExtensionServiceEndpoint adds a new endpoint to an extension service.
	AddExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, endpoint *ExtensionServiceEndpoint) (*ExtensionServiceEndpoint, error)
	// GetExtensionServiceEndpoint retrieves an extension endpoint by its ID.
	GetExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, endpointID string) (*ExtensionServiceEndpoint, error)
	// ListExtensionServiceEndpoints retrieves all endpoints belonging to an extension service.
	ListExtensionServiceEndpoints(ctx context.Context, extensionID string, serviceID string) ([]*ExtensionServiceEndpoint, error)
	// UpdateExtensionServiceEndpoint updates an endpoint belonging to an extension service.
	UpdateExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, newEndpoint *ExtensionServiceEndpoint) error
	// DeleteExtensionServiceEndpoint deletes an extension endpoint from an extension service.
	DeleteExtensionServiceEndpoint(ctx context.Context, extensionID, serviceID, endpointID string) error
	// AddExtensionServiceCredentials adds a new credential to an extension service.
	AddExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentials *ExtensionServiceCredentials) (*ExtensionServiceCredentials, error)
	// GetExtensionServiceCredentials retrieves an extension credential by its ID.
	GetExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentialsID string) (*ExtensionServiceCredentials, error)
	// ListExtensionServiceCredentials retrieves all credentials belonging to an extension service.
	ListExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string) ([]*ExtensionServiceCredentials, error)
	// UpdateExtensionServiceCredentials updates an extension credential.
	UpdateExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentials *ExtensionServiceCredentials) (err error)
	// DeleteExtensionServiceCredentials deletes an extension credential from an extension service.
	DeleteExtensionServiceCredentials(ctx context.Context, extensionID, serviceID, credentialsID string) error
	// GetExtensionAccessDescriptors retrieves access descriptors belonging to an extension that match the query.
	GetExtensionAccessDescriptors(ctx context.Context, query *ExtensionQuery) (result []*ExtensionAccessDescriptor, err error)
}

ExtensionStore defines the interface required to store extensions.

type GitAdminClient added in v0.2.1

type GitAdminClient interface {
	PrepareRepository(*Codeset, *string) (*string, *string, error)
	CreateRepoWebhook(string, string, *string) (*int64, error)
	DeleteRepoWebhook(string, string, *int64) error
	GetRepositories(org, label *string) ([]*Codeset, error)
	GetRepository(org, name string) (*Codeset, error)
	DeleteRepository(org, name string) error
	GetProjects() ([]*Project, error)
	GetProject(org string) (*Project, error)
	DeleteProject(org string) error
	CreateProject(string, string, bool) (*Project, error)
}

GitAdminClient describes the interface of a Git admin client

type KubernetesResource

type KubernetesResource struct {
	// The name of the Kubernetes resource
	Name string
	// The kind of Kubernetes resource
	Kind string
}

KubernetesResource describes the Kubernetes resource that forms the application

type Project added in v0.2.1

type Project struct {
	// The name of the Project
	Name string
	// Project description
	Description string
	// Users assigned to the project
	Users []*User
}

Project represents a project artifact

type ProjectStore added in v0.2.1

type ProjectStore interface {
	Find(ctx context.Context, name string) (*Project, error)
	GetAll(ctx context.Context) ([]*Project, error)
	Delete(ctx context.Context, name string) error
	Create(ctx context.Context, name, desc string) (*Project, error)
}

ProjectStore is an interface to project stores

type Runnable

type Runnable struct {
	// Unique runnable ID
	ID string
	// The runnable's creation time
	Created time.Time
	// Optional description
	Description string
	// The author
	Author string
	// The URL for sources used to build the runnable
	Source string
	// The kind of runnable (builder, trainer, predictor etc.)
	Kind string
	// Runnable implementation details
	// TODO: consider having several implementation flavors - e.g. several container images,
	// all able to accept the same set of inputs/outputs, but built using diferent software,
	// each targeting a different type of hardware resource that it can consume (e.g. one image
	// for generic CPUs, one for GPUs from vendor X, one for TPUs from vendor Y etc.). This example
	// cannot be modeled using one image and input parameters because the different sofware requirements
	// can't coexist in the same container image.
	Container RunnableContainer
	// Map of inputs - artifacts or parameters - accepted by this runnable, indexed by name
	Inputs map[string]interface{}
	// Map of outputs - artifacts or parameters - generated by this runnable, indexed by name
	Outputs map[string]interface{}
	// Default root container path where the container expects input parameter values and/or artifact contents
	// to be provided by the framework
	DefaultInputPath string
	// Default root container path where the container expects to provide output parameter values and/or
	// artifact contents back to the framework
	DefaultOutputPath string
	// Labels describing global capabilities, requirements etc. These labels can be used to run queries
	// and to validate which runnables can be used in workflow templates.
	Labels map[string]string
}

Runnable descriptor

type RunnableArgDesc

type RunnableArgDesc struct {
	// Unique name
	Name string
	// Optional description
	Description string
	// Labels describing custom properties or property requirements; these are hints used in matching
	// inputs with outputs when deciding how runnables can be connected together to form more complex
	// workflows. Regular expressions may be used instead of explicit label values.
	Labels map[string]string
}

RunnableArgDesc is a descriptor common to all runnable inputs/outputs

type RunnableArtifactArgDesc

type RunnableArtifactArgDesc struct {
	RunnableArgDesc
	// Data passing mechanisms supported by the runnable implementation used to provide the artifact's contents to the container
	Provider []ArtifactProvider
	// Argument dimension
	Dimension RunnableArtifactArgDimension
}

RunnableArtifactArgDesc is a descriptor common to all runnable inputs/outputs of type artifact

type RunnableArtifactArgDimension

type RunnableArtifactArgDimension string

RunnableArtifactArgDimension encodes valid values that can be assigned to the RunnableArtifactArgDesc.Dimension field

const (
	RAADSingle RunnableArtifactArgDimension = "single"
	RAADArray                               = "array"
)

Valid values that can be used with RunnableArtifactArgDimension

type RunnableCodesetArtifact

type RunnableCodesetArtifact struct {
	// The type of information contained in the codeset
	Type []string
	// The intended function of the codeset's contents
	Function []string
	// The format(s) used for the codeset's contents
	Format []string
	// Software packages, modules, libraries, toolkits etc. and optional semantic version or version requirements
	Requirements map[string]string
}

RunnableCodesetArtifact holds information about a codeset artifact used as input/output

type RunnableContainer

type RunnableContainer struct {
	// The container image associated with this runnable
	Image string
	// This flag indicates that the image is stored in the built-in container registry and the registry
	// hostname is not included in the image location
	LocalImage bool
	// Environment variables
	Env map[string]string
	// Entrypoint
	Entrypoint string
	// Entrypoint arguments
	Args []string
}

RunnableContainer describes the container implementation of a runnable

type RunnableDatasetArtifact

type RunnableDatasetArtifact struct {
	// The type of dataset
	Type []string
	// The dataset format
	Format []string
	// The compression used for the dataset
	Compression []string
}

RunnableDatasetArtifact holds information about a dataset artifact used as input/output

type RunnableInputArtifact

type RunnableInputArtifact struct {
	RunnableArtifactArgDesc
	// Marks an optional input artifact
	Optional bool
	// Custom container path where the artifact contents or the artifact URL(s) are provided to the container
	Path string
}

RunnableInputArtifact is a generic runnable input artifact definition

type RunnableInputCodeset

type RunnableInputCodeset struct {
	RunnableInputArtifact
	RunnableCodesetArtifact
}

RunnableInputCodeset is a runnable input artifact of type codeset

type RunnableInputDataset

type RunnableInputDataset struct {
	RunnableInputArtifact
	RunnableDatasetArtifact
}

RunnableInputDataset is a runnable input artifact of type dataset

type RunnableInputModel

type RunnableInputModel struct {
	RunnableInputArtifact
	RunnableModelArtifact
}

RunnableInputModel is a runnable input artifact of type model

type RunnableInputParameter

type RunnableInputParameter struct {
	RunnableArgDesc
	// Marks an optional input parameter. A default value must also be supplied.
	Optional bool
	// Default parameter value - used for optional input parameters when the value is not provided explicitly
	DefaultValue string
	// Optional container path where the parameter value is passed by the framework to the container. This method
	// can be used for example when the parameter value represents the contents of a configuration or script.
	Path string
}

RunnableInputParameter is the runnable input parameter definition

type RunnableInputRunnable

type RunnableInputRunnable struct {
	RunnableInputArtifact
	RunnableRunnableArtifact
}

RunnableInputRunnable is a runnable input artifact of type runnable

type RunnableKind

type RunnableKind string

RunnableKind encodes valid values that can be assigned to the Runnable.Kind field

type RunnableModelArtifact

type RunnableModelArtifact struct {
	// The format used to package the model
	Format []string
	// Denotes a pre-trained model that is ready to use
	Pretrained bool
	// Method used to train the model
	Method string
	// Class of algorithm implemented by the model
	Class string
	// The intended function for the model
	Function string
	// Software packages, modules, libraries, toolkits etc. and optional semantic version or version requirements
	Requirements map[string]string
}

RunnableModelArtifact holds information about a model artifact used as input/output

type RunnableOutputArtifact

type RunnableOutputArtifact struct {
	RunnableArtifactArgDesc
	// Marks an optional output artifact
	Optional bool
	// Custom container path where the artifact contents or the artifact URL(s) are provided by the container
	Path string
}

RunnableOutputArtifact is a generic runnable output artifact definition

type RunnableOutputCodeset

type RunnableOutputCodeset struct {
	RunnableOutputArtifact
	RunnableCodesetArtifact
}

RunnableOutputCodeset is a runnable output artifact of type codeset

type RunnableOutputDataset

type RunnableOutputDataset struct {
	RunnableOutputArtifact
	RunnableDatasetArtifact
}

RunnableOutputDataset is a runnable output artifact of type dataset

type RunnableOutputModel

type RunnableOutputModel struct {
	RunnableOutputArtifact
	RunnableModelArtifact
}

RunnableOutputModel is a runnable output artifact of type model

type RunnableOutputParameter

type RunnableOutputParameter struct {
	RunnableArgDesc
	// Marks an optional output parameter. A default value must also be supplied.
	Optional bool
	// Default parameter value - used for optional output parameters when the value is not provided by the runnable implementation
	DefaultValue string
	// Custom container path where the parameter value is provided by the container.
	Path string
}

RunnableOutputParameter is the runnable output parameter definition

type RunnableOutputRunnable

type RunnableOutputRunnable struct {
	RunnableOutputArtifact
	RunnableRunnableArtifact
}

RunnableOutputRunnable is a runnable output artifact of type runnable

type RunnableRunnableArtifact

type RunnableRunnableArtifact struct {
	// The kind of runnable
	Kind string
}

RunnableRunnableArtifact holds information about a runnable used as input/output

type RunnableStore

type RunnableStore interface {
	Find(ctx context.Context, id string, kind string, labels map[string]string) (res []*Runnable, err error)
	Register(ctx context.Context, r *Runnable) (res *Runnable, err error)
	Get(ctx context.Context, name string) (res *Runnable, err error)
}

RunnableStore defines the public interface that needs to be implemented by all runnable stores

type User added in v0.2.1

type User struct {
	Name  string
	Email string
}

User represents user assigned to the project

type Workflow added in v0.2.1

type Workflow struct {
	// CreatedAt is the time the workflow was created.
	Created time.Time
	// Name is the name of the workflow.
	Name string
	// Description is the description of the workflow.
	Description string
	// Inputs is the list of workflow inputs.
	Inputs []*WorkflowInput
	// Outputs is the list of workflow outputs.
	Outputs []*WorkflowOutput
	// Steps is the list of workflow steps.
	Steps []*WorkflowStep
	// AssignedTo is the assignments of the workflow.
	AssignedTo *WorkflowAssignment
}

Workflow represents a FuseML workflow.

func (*Workflow) AssignToCodeset added in v0.2.1

func (w *Workflow) AssignToCodeset(ctx context.Context, codeset *Codeset, webhookID *int64) error

AssignToCodeset assigns a workflow to a codeset.

func (*Workflow) GetCodesetAssignment added in v0.2.1

func (w *Workflow) GetCodesetAssignment(ctx context.Context, codeset *Codeset) (*CodesetAssignment, error)

GetCodesetAssignment returns the assignment for a workflow and a codeset.

func (*Workflow) GetCodesetAssignments added in v0.2.1

func (w *Workflow) GetCodesetAssignments(ctx context.Context) []*CodesetAssignment

GetCodesetAssignments returns the codeset assignments for a workflow.

func (*Workflow) UnassignFromCodeset added in v0.2.1

func (w *Workflow) UnassignFromCodeset(ctx context.Context, codeset *Codeset) error

UnassignFromCodeset removes a workflow assignment from a codeset.

type WorkflowAssignment added in v0.2.1

type WorkflowAssignment struct {
	// Codesets is the list of codesets that the workflow is assigned to.
	Codesets []*CodesetAssignment
}

WorkflowAssignment represents a workflow assignment.

type WorkflowAssignmentStatus added in v0.2.1

type WorkflowAssignmentStatus struct {
	// Available is weather the assignment is available.
	Available bool
	// URL is the URL to the assignment.
	URL string
}

WorkflowAssignmentStatus represents the status of a workflow assignment.

type WorkflowBackend

type WorkflowBackend interface {
	// CreateWorkflow creates a new workflow.
	CreateWorkflow(ctx context.Context, workflow *Workflow) error
	// DeleteWorkflow deletes a workflow.
	DeleteWorkflow(ctx context.Context, workflowName string) error
	// CreateWorkflowRun creates a new workflow run.
	CreateWorkflowRun(ctx context.Context, workflowName string, codeset *Codeset) error
	// GetWorkflowRuns returns a list of workflow runs.
	GetWorkflowRuns(ctx context.Context, workflow *Workflow, filter *WorkflowRunFilter) ([]*WorkflowRun, error)
	// CreateWorkflowListener creates a new workflow listener.
	CreateWorkflowListener(ctx context.Context, workflowName string, timeout time.Duration) (*WorkflowListener, error)
	// DeleteWorkflowListener deletes a workflow listener.
	DeleteWorkflowListener(ctx context.Context, workflowName string) error
	// GetWorkflowListener returns a workflow listener for a workflow.
	GetWorkflowListener(ctx context.Context, workflowName string) (*WorkflowListener, error)
}

WorkflowBackend is the interface for the FuseML workflows

type WorkflowErr added in v0.2.1

type WorkflowErr string

WorkflowErr are expected errors returned when performing operations on workflows,

func (WorkflowErr) Error added in v0.2.1

func (e WorkflowErr) Error() string

Error returns the error message

type WorkflowIOType added in v0.2.1

type WorkflowIOType string

WorkflowIOType is the type of a workflow input/output.

const (
	// WorkflowIOTypeString represents a workflow input that is of a string type.
	WorkflowIOTypeString WorkflowIOType = "string"
	// WorkflowIOTypeCodeset represents a workflow input that is a of codeset type.
	WorkflowIOTypeCodeset WorkflowIOType = "codeset"
)

func (WorkflowIOType) String added in v0.2.1

func (t WorkflowIOType) String() string

String returns the string representation of the Workflow Input/Output type

type WorkflowInput added in v0.2.1

type WorkflowInput struct {
	// Name is the name of the input.
	Name string
	// Description is the description of the input.
	Description string
	// Type is the type of the input.
	Type WorkflowIOType
	// Default is the default value of the input.
	Default string
	// Labels is the list of labels for the input.
	Labels []string
}

WorkflowInput represents a input for a FuseML workflow.

type WorkflowListener added in v0.0.2

type WorkflowListener struct {
	// Name is the name of the listener.
	Name string
	// Available is weather the listener is available.
	Available bool
	// URL is the URL to the listener.
	URL string
	// DashboardURL is the URL to the dashboard for the listener.
	DashboardURL string
}

WorkflowListener defines a listener for a workflow

type WorkflowManager added in v0.2.1

type WorkflowManager interface {
	// CreateWorkflow creates a new workflow.
	CreateWorkflow(ctx context.Context, workflow *Workflow) (*Workflow, error)
	// GetWorkflow retrieves a workflow.
	GetWorkflow(ctx context.Context, name string) (*Workflow, error)
	// GetWorkflows returns a list of workflows.
	GetWorkflows(ctx context.Context, name *string) []*Workflow
	// DeleteWorkflow deletes a workflow.
	DeleteWorkflow(ctx context.Context, name string) error
	// AssignToCodeset assigns a workflow to a codeset.
	AssignToCodeset(ctx context.Context, name, codesetProject, codesetName string) (*WorkflowListener, *int64, error)
	// UnassignFromCodeset removes a workflow assignment from a codeset.
	UnassignFromCodeset(ctx context.Context, name, codesetProject, codesetName string) error
	// GetAllCodesetAssignments returns all the codeset assignments from all workflows, or a specific one.
	GetAllCodesetAssignments(ctx context.Context, name *string) map[string][]*CodesetAssignment
	// GetAssignmentStatus returns the status of a workflow assignment.
	GetAssignmentStatus(ctx context.Context, name string) *WorkflowAssignmentStatus
	// GetWorkflowRuns returns all the workflow runs for a workflow.
	GetWorkflowRuns(ctx context.Context, filter *WorkflowRunFilter) ([]*WorkflowRun, error)
}

WorkflowManager describes the interface for a Workflow Manager

type WorkflowOutput added in v0.2.1

type WorkflowOutput struct {
	// Name is the name of the output.
	Name string
	// Description is the description of the output.
	Description string
	// Type is the type of the output.
	Type WorkflowIOType
}

WorkflowOutput represents the output for a FuseML workflow.

type WorkflowRun added in v0.2.1

type WorkflowRun struct {
	// Name is the name of the workflow run.
	Name string
	// WorkflowRef is the reference to the workflow.
	WorkflowRef string
	// Inputs is the list of workflow inputs used on a run.
	Inputs []*WorkflowRunInput
	// Outputs is the list of workflow outputs from a run.
	Outputs []*WorkflowRunOutput
	// StartTime is the time the workflow run started.
	StartTime time.Time
	// CompletionTime is the time the workflow run completed.
	CompletionTime time.Time
	// Status is the status of the workflow run.
	Status string
	// URL is the URL to the workflow run.
	URL string
}

WorkflowRun represents a FuseML workflow run.

type WorkflowRunFilter

type WorkflowRunFilter struct {
	// WorkflowName is the name of the workflow to filter by.
	WorkflowName *string
	// CodesetName is the name of the codeset to filter by.
	CodesetName string
	// CodesetProject is the name of the codeset project to filter by.
	CodesetProject string
	// Status is the status of the workflow run to filter by.
	Status []string
}

WorkflowRunFilter defines the available filter when listing workflow runs.

type WorkflowRunInput added in v0.2.1

type WorkflowRunInput struct {
	// Input is the input from the workflow.
	Input *WorkflowInput
	// Value is the value of the input for a run.
	Value string
}

WorkflowRunInput represents a input from a FuseML workflow run.

type WorkflowRunOutput added in v0.2.1

type WorkflowRunOutput struct {
	// Output is the output from the workflow.
	Output *WorkflowOutput
	// Value is the value of the output for a run.
	Value string
}

WorkflowRunOutput represents a output from a FuseML workflow run.

type WorkflowStep added in v0.2.1

type WorkflowStep struct {
	// Name is the name of the step.
	Name string
	// Image is the name of the image to use for the step.
	Image string
	// Inputs is the list of inputs for the step.
	Inputs []*WorkflowStepInput
	// Outputs is the list of outputs for the step.
	Outputs []*WorkflowStepOutput
	// Extensions is the list of extensions required for the step.
	Extensions []*WorkflowStepExtension
	// Env is the list of environment variables for the step.
	Env []*WorkflowStepEnv
	// Resources specify the resources requests and limits for the step.
	Resources WorkflowStepResources
}

WorkflowStep represents a step in a FuseML workflow.

type WorkflowStepEnv added in v0.2.1

type WorkflowStepEnv struct {
	// Name is the name of the environment variable.
	Name string
	// Value is the value of the environment variable.
	Value string
}

WorkflowStepEnv represents an environment variable for a FuseML workflow step.

type WorkflowStepExtension added in v0.2.1

type WorkflowStepExtension struct {
	// Unique name used to reference this extension requirement
	Name string
	// Reference extension explicitly by ID
	ExtensionID string
	// Reference extension by product name
	Product string
	// Filter extension by version or by semantic version constraints
	VersionConstraints string
	// Match extensions installed in a given zone
	Zone string
	// Reference service explicitly by ID
	ServiceID string
	// Filter by service resource type
	ServiceResource string
	// Filter by service category
	ServiceCategory string
	// Extension access - points to the extension endpoint and credentials that
	// the extension requirements are (currently) resolved to
	ExtensionAccess *ExtensionAccessDescriptor
}

WorkflowStepExtension represents the extension requirements for a FuseML workflow step.

type WorkflowStepInput added in v0.2.1

type WorkflowStepInput struct {
	// Name is the name of the input.
	Name string
	// Value is the value of the input.
	Value string
	// Codeset is the codeset to use for the input.
	Codeset *WorkflowStepInputCodeset
}

WorkflowStepInput represents a input for a FuseML workflow step.

type WorkflowStepInputCodeset added in v0.2.1

type WorkflowStepInputCodeset struct {
	// Name is the name of the codeset.
	Name string
	// Path is the path where the codeset will be mounted
	Path string
}

WorkflowStepInputCodeset represents a codeset for a FuseML workflow step input.

type WorkflowStepOutput added in v0.2.1

type WorkflowStepOutput struct {
	// Name is the name of the output.
	Name string
	// Image is the image generated by the step
	Image *WorkflowStepOutputImage
}

WorkflowStepOutput represents a output for a FuseML workflow step.

type WorkflowStepOutputImage added in v0.2.1

type WorkflowStepOutputImage struct {
	// Dockerfile is the path to the Dockerfile used to build the image.
	Dockerfile string
	// Image is the name of the image.
	Name string
}

WorkflowStepOutputImage represents a image generated by a FuseML workflow step.

type WorkflowStepResources added in v0.3.0

type WorkflowStepResources struct {
	// Requests is a map of resource and its request value.
	Requests map[string]string
	// Limits is a map of resource and its limit value.
	Limits map[string]string
}

WorkflowStepResources represents the resources requests and limits for a FuseML workflow step.

type WorkflowStore

type WorkflowStore interface {
	// AddWorkflow adds a workflow to the store.
	AddWorkflow(ctx context.Context, w *Workflow) (*Workflow, error)
	// GetWorkflow returns a workflow.
	GetWorkflow(ctx context.Context, name string) (*Workflow, error)
	// ListWorkflows returns a list of workflows.
	GetWorkflows(ctx context.Context, name *string) []*Workflow
	// DeleteWorkflow deletes a workflow from the store.
	DeleteWorkflow(ctx context.Context, name string) error
	// AddCodesetAssignment adds a codeset assignment to the store.
	AddCodesetAssignment(ctx context.Context, workflowName string, codeset *Codeset, webhook *int64) ([]*CodesetAssignment, error)
	// GetCodesetAssignment returns the assignment for a workflow and a codeset.
	GetCodesetAssignment(ctx context.Context, workflowName string, codeset *Codeset) (*CodesetAssignment, error)
	// GetCodesetAssignments returns the codeset assignments for a workflow.
	GetCodesetAssignments(ctx context.Context, workflowName string) []*CodesetAssignment
	// GetAllCodesetAssignments returns all the codeset assignments from all workflows, or a specific one.
	GetAllCodesetAssignments(ctx context.Context, workflowName *string) map[string][]*CodesetAssignment
	// DeleteCodesetAssignment deletes a codeset assignment from the store.
	DeleteCodesetAssignment(ctx context.Context, workflowName string, codeset *Codeset) ([]*CodesetAssignment, error)
}

WorkflowStore is an interface for workflow stores.

Jump to

Keyboard shortcuts

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