runtimesdk

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPBackendService

func NewHTTPBackendService(baseURL, token string, client *http.Client) backendservice.Service

NewHTTPBackendService creates a new HTTP client that implements backendservice.Service

func NewHTTPDownloadService

func NewHTTPDownloadService(baseURL, token string, client *http.Client) downloadservice.Service

NewHTTPDownloadService creates a new HTTP client that implements downloadservice.Service

func NewHTTPEmbedService added in v0.0.6

func NewHTTPEmbedService(baseURL, token string, client *http.Client) embedservice.Service

NewHTTPEmbedService creates a new HTTP client that implements embedservice.Service

func NewHTTPExecService

func NewHTTPExecService(baseURL, token string, client *http.Client) execservice.ExecService

NewHTTPExecService creates a new HTTP client that implements execservice.ExecService

func NewHTTPModelService

func NewHTTPModelService(baseURL, token string, client *http.Client) modelservice.Service

NewHTTPModelService creates a new HTTP client that implements modelservice.Service

func NewHTTPPoolService

func NewHTTPPoolService(baseURL, token string, client *http.Client) poolservice.Service

NewHTTPPoolService creates a new HTTP client that implements poolservice.Service

func NewHTTPProviderService

func NewHTTPProviderService(baseURL, token string, client *http.Client) providerservice.Service

NewHTTPProviderService creates a new HTTP client that implements providerservice.Service

func NewHTTPRemoteHookService

func NewHTTPRemoteHookService(baseURL, token string, client *http.Client) hookproviderservice.Service

NewHTTPRemoteHookService creates a new HTTP client that implements hookproviderservice.Service

func NewHTTPStateService added in v0.0.5

func NewHTTPStateService(baseURL, token string, client *http.Client) stateservice.Service

NewHTTPStateService creates a new HTTP client that implements stateservice.Service

func NewHTTPTasksEnvService

func NewHTTPTasksEnvService(baseURL, token string, client *http.Client) execservice.TasksEnvService

NewHTTPTasksEnvService creates a new HTTP client that implements execservice.TasksEnvService

Types

type Client

type Client struct {
	BackendService  backendservice.Service
	ModelService    modelservice.Service
	PoolService     poolservice.Service
	HookService     hookproviderservice.Service
	ExecService     execservice.ExecService
	EnvService      execservice.TasksEnvService
	ProviderService providerservice.Service
	DownloadService downloadservice.Service
	StateService    stateservice.Service
	EmbedService    embedservice.Service
}

Client is the main SDK client that provides access to all services

func NewClient

func NewClient(config Config, http *http.Client) (*Client, error)

NewClient creates a new SDK client with the provided configuration

type Config

type Config struct {
	BaseURL string
	Token   string
}

Config holds configuration for the SDK client

type HTTPBackendService

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

HTTPBackendService implements the backendservice.Service interface using HTTP calls to the API

func (*HTTPBackendService) Create

func (s *HTTPBackendService) Create(ctx context.Context, backend *runtimetypes.Backend) error

Create implements backendservice.Service.Create

func (*HTTPBackendService) Delete

func (s *HTTPBackendService) Delete(ctx context.Context, id string) error

Delete implements backendservice.Service.Delete

func (*HTTPBackendService) Get

Get implements backendservice.Service.Get

func (*HTTPBackendService) List

func (s *HTTPBackendService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Backend, error)

List implements backendservice.Service.List

func (*HTTPBackendService) Update

func (s *HTTPBackendService) Update(ctx context.Context, backend *runtimetypes.Backend) error

Update implements backendservice.Service.Update

type HTTPDownloadService

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

HTTPDownloadService implements the downloadservice.Service interface using HTTP calls to the API

func (*HTTPDownloadService) CancelDownloads

func (s *HTTPDownloadService) CancelDownloads(ctx context.Context, urlParam string) error

CancelDownloads implements downloadservice.Service.CancelDownloads

func (*HTTPDownloadService) CurrentDownloadQueueState

func (s *HTTPDownloadService) CurrentDownloadQueueState(ctx context.Context) ([]downloadservice.Job, error)

CurrentDownloadQueueState implements downloadservice.Service.CurrentDownloadQueueState

func (*HTTPDownloadService) DownloadInProgress

func (s *HTTPDownloadService) DownloadInProgress(ctx context.Context, statusCh chan<- *runtimetypes.Status) error

DownloadInProgress implements downloadservice.Service.DownloadInProgress

func (*HTTPDownloadService) RemoveDownloadFromQueue

func (s *HTTPDownloadService) RemoveDownloadFromQueue(ctx context.Context, modelName string) error

RemoveDownloadFromQueue implements downloadservice.Service.RemoveDownloadFromQueue

type HTTPEmbedService added in v0.0.6

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

HTTPEmbedService implements the embedservice.Service interface using HTTP calls to the API

func (*HTTPEmbedService) DefaultModelName added in v0.0.7

func (s *HTTPEmbedService) DefaultModelName(ctx context.Context) (string, error)

DefaultModelName implements embedservice.Service.

func (*HTTPEmbedService) Embed added in v0.0.6

func (s *HTTPEmbedService) Embed(ctx context.Context, text string) ([]float64, error)

Embed implements embedservice.Service.Embed

type HTTPExecService

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

HTTPExecService implements the execservice.ExecService interface using HTTP calls to the API

func (*HTTPExecService) Execute

Execute implements execservice.ExecService.Execute

type HTTPModelService

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

HTTPModelService implements the modelservice.Service interface using HTTP calls to the API

func (*HTTPModelService) Append

func (s *HTTPModelService) Append(ctx context.Context, model *runtimetypes.Model) error

Append implements modelservice.Service.Append

func (*HTTPModelService) Delete

func (s *HTTPModelService) Delete(ctx context.Context, modelName string) error

Delete implements modelservice.Service.Delete

func (*HTTPModelService) List

func (s *HTTPModelService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Model, error)

List implements modelservice.Service.List Uses the internal /internal/models endpoint to get full model details

func (*HTTPModelService) Update added in v0.0.19

func (s *HTTPModelService) Update(ctx context.Context, data *runtimetypes.Model) error

Update implements modelservice.Service.Update

type HTTPPoolService

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

HTTPPoolService implements the poolservice.Service interface using HTTP calls to the API

func (*HTTPPoolService) AssignBackend

func (s *HTTPPoolService) AssignBackend(ctx context.Context, poolID, backendID string) error

AssignBackend implements poolservice.Service.AssignBackend

func (*HTTPPoolService) AssignModel

func (s *HTTPPoolService) AssignModel(ctx context.Context, poolID, modelID string) error

AssignModel implements poolservice.Service.AssignModel

func (*HTTPPoolService) Create

func (s *HTTPPoolService) Create(ctx context.Context, pool *runtimetypes.Pool) error

Create implements poolservice.Service.Create

func (*HTTPPoolService) Delete

func (s *HTTPPoolService) Delete(ctx context.Context, id string) error

Delete implements poolservice.Service.Delete

func (*HTTPPoolService) GetByID

func (s *HTTPPoolService) GetByID(ctx context.Context, id string) (*runtimetypes.Pool, error)

GetByID implements poolservice.Service.GetByID

func (*HTTPPoolService) GetByName

func (s *HTTPPoolService) GetByName(ctx context.Context, name string) (*runtimetypes.Pool, error)

GetByName implements poolservice.Service.GetByName

func (*HTTPPoolService) ListAll

func (s *HTTPPoolService) ListAll(ctx context.Context) ([]*runtimetypes.Pool, error)

ListAll implements poolservice.Service.ListAll

func (*HTTPPoolService) ListBackends

func (s *HTTPPoolService) ListBackends(ctx context.Context, poolID string) ([]*runtimetypes.Backend, error)

ListBackends implements poolservice.Service.ListBackends

func (*HTTPPoolService) ListByPurpose

func (s *HTTPPoolService) ListByPurpose(ctx context.Context, purpose string, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Pool, error)

ListByPurpose implements poolservice.Service.ListByPurpose

func (*HTTPPoolService) ListModels

func (s *HTTPPoolService) ListModels(ctx context.Context, poolID string) ([]*runtimetypes.Model, error)

ListModels implements poolservice.Service.ListModels

func (*HTTPPoolService) ListPoolsForBackend

func (s *HTTPPoolService) ListPoolsForBackend(ctx context.Context, backendID string) ([]*runtimetypes.Pool, error)

ListPoolsForBackend implements poolservice.Service.ListPoolsForBackend

func (*HTTPPoolService) ListPoolsForModel

func (s *HTTPPoolService) ListPoolsForModel(ctx context.Context, modelID string) ([]*runtimetypes.Pool, error)

ListPoolsForModel implements poolservice.Service.ListPoolsForModel

func (*HTTPPoolService) RemoveBackend

func (s *HTTPPoolService) RemoveBackend(ctx context.Context, poolID, backendID string) error

RemoveBackend implements poolservice.Service.RemoveBackend

func (*HTTPPoolService) RemoveModel

func (s *HTTPPoolService) RemoveModel(ctx context.Context, poolID, modelID string) error

RemoveModel implements poolservice.Service.RemoveModel

func (*HTTPPoolService) Update

func (s *HTTPPoolService) Update(ctx context.Context, pool *runtimetypes.Pool) error

Update implements poolservice.Service.Update

type HTTPProviderService

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

HTTPProviderService implements the providerservice.Service interface using HTTP calls to the API

func (*HTTPProviderService) DeleteProviderConfig

func (s *HTTPProviderService) DeleteProviderConfig(ctx context.Context, providerType string) error

DeleteProviderConfig implements providerservice.Service.DeleteProviderConfig

func (*HTTPProviderService) GetProviderConfig

func (s *HTTPProviderService) GetProviderConfig(ctx context.Context, providerType string) (*runtimestate.ProviderConfig, error)

GetProviderConfig implements providerservice.Service.GetProviderConfig

func (*HTTPProviderService) ListProviderConfigs

func (s *HTTPProviderService) ListProviderConfigs(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimestate.ProviderConfig, error)

ListProviderConfigs implements providerservice.Service.ListProviderConfigs

func (*HTTPProviderService) SetProviderConfig

func (s *HTTPProviderService) SetProviderConfig(ctx context.Context, providerType string, upsert bool, config *runtimestate.ProviderConfig) error

SetProviderConfig implements providerservice.Service.SetProviderConfig

type HTTPRemoteHookService

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

HTTPRemoteHookService implements the hookproviderservice.Service interface using HTTP calls to the API

func (*HTTPRemoteHookService) Create

Create implements hookproviderservice.Service.Create

func (*HTTPRemoteHookService) Delete

func (s *HTTPRemoteHookService) Delete(ctx context.Context, id string) error

Delete implements hookproviderservice.Service.Delete

func (*HTTPRemoteHookService) Get

Get implements hookproviderservice.Service.Get

func (*HTTPRemoteHookService) GetByName

GetByName implements hookproviderservice.Service.GetByName

func (*HTTPRemoteHookService) List

func (s *HTTPRemoteHookService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.RemoteHook, error)

List implements hookproviderservice.Service.List

func (*HTTPRemoteHookService) Update

Update implements hookproviderservice.Service.Update

type HTTPStateService added in v0.0.5

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

HTTPStateService implements the stateservice.Service interface using HTTP calls to the API

func (*HTTPStateService) Get added in v0.0.5

Get implements modelservice.Service.Get

type HTTPTasksEnvService

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

func (*HTTPTasksEnvService) Execute

Execute implements execservice.TasksEnvService.Execute

func (*HTTPTasksEnvService) Supports

func (s *HTTPTasksEnvService) Supports(ctx context.Context) ([]string, error)

Supports implements execservice.TasksEnvService.Supports (via taskengine.HookRegistry)

Jump to

Keyboard shortcuts

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