runtimesdk

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 31 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 NewHTTPChatService added in v0.0.58

func NewHTTPChatService(baseURL, token string, client *http.Client) chatservice.Service

NewHTTPChatService creates a new HTTP client that implements chatservice.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 NewHTTPEvenSourceService added in v0.0.74

func NewHTTPEvenSourceService(baseURL, token string, client *http.Client) eventsourceservice.Service

NewHTTPEvenSourceService creates a new HTTP client that implements eventsourceservice.Service.

func NewHTTPExecService

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

NewHTTPExecService creates a new HTTP client that implements execservice.ExecService

func NewHTTPExecutorSyncTrigger added in v0.0.74

func NewHTTPExecutorSyncTrigger(baseURL, token string, client *http.Client) executor.ExecutorSyncTrigger

NewHTTPExecutorSyncTrigger creates a new HTTP client for triggering executor sync

func NewHTTPMappingService added in v0.0.75

func NewHTTPMappingService(baseURL, token string, client *http.Client) eventmappingservice.Service

NewHTTPMappingService creates a new HTTP client that implements eventmappingservice.Service.

func NewHTTPModelService

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

NewHTTPModelService creates a new HTTP client that implements modelservice.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 NewHTTPTaskChainService added in v0.0.58

func NewHTTPTaskChainService(baseURL, token string, client *http.Client) taskchainservice.Service

NewHTTPTaskChainService creates a new HTTP client that implements taskchainservice.Service

func NewHTTPTasksEnvService

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

NewHTTPTasksEnvService creates a new HTTP client that implements execservice.TasksEnvService

func NewHTTPgroupService added in v0.0.65

func NewHTTPgroupService(baseURL, token string, client *http.Client) affinitygroupservice.Service

NewHTTPgroupService creates a new HTTP client that implements groupservice.Service

Types

type Client

type Client struct {
	BackendService backendservice.Service
	ModelService   modelservice.Service

	HookService         hookproviderservice.Service
	ExecService         execservice.ExecService
	EnvService          execservice.TasksEnvService
	ProviderService     providerservice.Service
	DownloadService     downloadservice.Service
	StateService        stateservice.Service
	EmbedService        embedservice.Service
	TaskChainService    taskchainservice.Service
	ChatService         chatservice.Service
	EventSourceService  eventsourceservice.Service
	ExecutorSyncTrigger executor.ExecutorSyncTrigger
	MappingService      eventmappingservice.Service
	// contains filtered or unexported fields
}

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

func NewClient

func NewClient(ctx context.Context, config Config, httpClient *http.Client) (*Client, error)

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 HTTPChatService added in v0.0.58

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

HTTPChatService implements the chatservice.Service interface using HTTP calls to the API

func (*HTTPChatService) OpenAIChatCompletions added in v0.0.58

OpenAIChatCompletions implements chatservice.Service.OpenAIChatCompletions

func (*HTTPChatService) OpenAIChatCompletionsStream added in v0.0.64

func (s *HTTPChatService) OpenAIChatCompletionsStream(ctx context.Context, chainID string, req taskengine.OpenAIChatRequest, speed time.Duration) (<-chan chatservice.OpenAIChatStreamChunk, error)

OpenAIChatCompletionsStream implements chatservice.Service.OpenAIChatCompletionsStream

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 HTTPEvenSourceService added in v0.0.74

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

HTTPEvenSourceService implements the eventsourceservice.Service interface using HTTP calls to the event source API.

func (*HTTPEvenSourceService) AppendEvent added in v0.0.74

func (s *HTTPEvenSourceService) AppendEvent(ctx context.Context, event *eventstore.Event) error

AppendEvent implements eventsourceservice.Service.AppendEvent.

func (*HTTPEvenSourceService) DeleteEventsByTypeInRange added in v0.0.74

func (s *HTTPEvenSourceService) DeleteEventsByTypeInRange(
	ctx context.Context,
	eventType string,
	from, to time.Time,
) error

DeleteEventsByTypeInRange implements eventsourceservice.Service.DeleteEventsByTypeInRange.

func (*HTTPEvenSourceService) GetEventTypesInRange added in v0.0.74

func (s *HTTPEvenSourceService) GetEventTypesInRange(
	ctx context.Context,
	from, to time.Time,
	limit int,
) ([]string, error)

GetEventTypesInRange implements eventsourceservice.Service.GetEventTypesInRange.

func (*HTTPEvenSourceService) GetEventsByAggregate added in v0.0.74

func (s *HTTPEvenSourceService) GetEventsByAggregate(
	ctx context.Context,
	eventType string,
	from, to time.Time,
	aggregateType, aggregateID string,
	limit int,
) ([]eventstore.Event, error)

GetEventsByAggregate implements eventsourceservice.Service.GetEventsByAggregate.

func (*HTTPEvenSourceService) GetEventsBySource added in v0.0.74

func (s *HTTPEvenSourceService) GetEventsBySource(
	ctx context.Context,
	eventType string,
	from, to time.Time,
	eventSource string,
	limit int,
) ([]eventstore.Event, error)

GetEventsBySource implements eventsourceservice.Service.GetEventsBySource.

func (*HTTPEvenSourceService) GetEventsByType added in v0.0.74

func (s *HTTPEvenSourceService) GetEventsByType(
	ctx context.Context,
	eventType string,
	from, to time.Time,
	limit int,
) ([]eventstore.Event, error)

GetEventsByType implements eventsourceservice.Service.GetEventsByType.

func (*HTTPEvenSourceService) SubscribeToEvents added in v0.0.74

func (s *HTTPEvenSourceService) SubscribeToEvents(ctx context.Context, eventType string, ch chan<- []byte) (eventsourceservice.Subscription, error)

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 HTTPExecutorSyncTrigger added in v0.0.74

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

HTTPExecutorSyncTrigger implements executor.ExecutorSyncTrigger using HTTP calls to the API

func (*HTTPExecutorSyncTrigger) TriggerSync added in v0.0.74

func (s *HTTPExecutorSyncTrigger) TriggerSync()

TriggerSync implements executor.ExecutorSyncTrigger.TriggerSync

type HTTPMappingService added in v0.0.75

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

HTTPMappingService implements the eventmappingservice.Service interface using HTTP calls to the mapping API.

func (*HTTPMappingService) CreateMapping added in v0.0.75

func (s *HTTPMappingService) CreateMapping(ctx context.Context, config *eventstore.MappingConfig) error

CreateMapping implements eventmappingservice.Service.CreateMapping.

func (*HTTPMappingService) DeleteMapping added in v0.0.75

func (s *HTTPMappingService) DeleteMapping(ctx context.Context, path string) error

DeleteMapping implements eventmappingservice.Service.DeleteMapping.

func (*HTTPMappingService) GetMapping added in v0.0.75

func (s *HTTPMappingService) GetMapping(ctx context.Context, path string) (*eventstore.MappingConfig, error)

GetMapping implements eventmappingservice.Service.GetMapping.

func (*HTTPMappingService) ListMappings added in v0.0.75

func (s *HTTPMappingService) ListMappings(ctx context.Context) ([]*eventstore.MappingConfig, error)

ListMappings implements eventmappingservice.Service.ListMappings.

func (*HTTPMappingService) UpdateMapping added in v0.0.75

func (s *HTTPMappingService) UpdateMapping(ctx context.Context, config *eventstore.MappingConfig) error

UpdateMapping implements eventmappingservice.Service.UpdateMapping.

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 /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 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) GetSchemasForSupportedHooks added in v0.0.74

func (s *HTTPRemoteHookService) GetSchemasForSupportedHooks(ctx context.Context) (map[string]*openapi3.T, error)

GetSchemasForSupportedHooks implements hookproviderservice.Service.GetSchemasForSupportedHooks. GetSchemasForSupportedHooks implements hookproviderservice.Service.GetSchemasForSupportedHooks.

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 HTTPTaskChainService added in v0.0.58

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

HTTPTaskChainService implements the taskchainservice.Service interface using HTTP calls to the API

func (*HTTPTaskChainService) Create added in v0.0.58

Create implements taskchainservice.Service.Create

func (*HTTPTaskChainService) Delete added in v0.0.58

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

Delete implements taskchainservice.Service.Delete

func (*HTTPTaskChainService) Get added in v0.0.58

Get implements taskchainservice.Service.Get

func (*HTTPTaskChainService) List added in v0.0.58

List implements taskchainservice.Service.List

func (*HTTPTaskChainService) Update added in v0.0.58

Update implements taskchainservice.Service.Update

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

type HTTPgroupService added in v0.0.65

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

HTTPgroupService implements the groupservice.Service interface using HTTP calls to the API

func (*HTTPgroupService) AssignBackend added in v0.0.65

func (s *HTTPgroupService) AssignBackend(ctx context.Context, groupID, backendID string) error

AssignBackend implements groupservice.Service.AssignBackend

func (*HTTPgroupService) AssignModel added in v0.0.65

func (s *HTTPgroupService) AssignModel(ctx context.Context, groupID, modelID string) error

AssignModel implements groupservice.Service.AssignModel

func (*HTTPgroupService) Create added in v0.0.65

Create implements groupservice.Service.Create

func (*HTTPgroupService) Delete added in v0.0.65

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

Delete implements groupservice.Service.Delete

func (*HTTPgroupService) GetByID added in v0.0.65

GetByID implements groupservice.Service.GetByID

func (*HTTPgroupService) GetByName added in v0.0.65

GetByName implements groupservice.Service.GetByName

func (*HTTPgroupService) ListAffinityGroupsForBackend added in v0.0.65

func (s *HTTPgroupService) ListAffinityGroupsForBackend(ctx context.Context, backendID string) ([]*runtimetypes.AffinityGroup, error)

ListAffinityGroupsForBackend implements groupservice.Service.ListAffinityGroupsForBackend

func (*HTTPgroupService) ListAffinityGroupsForModel added in v0.0.65

func (s *HTTPgroupService) ListAffinityGroupsForModel(ctx context.Context, modelID string) ([]*runtimetypes.AffinityGroup, error)

ListAffinityGroupsForModel implements groupservice.Service.ListAffinityGroupsForModel

func (*HTTPgroupService) ListAll added in v0.0.65

ListAll implements groupservice.Service.ListAll

func (*HTTPgroupService) ListBackends added in v0.0.65

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

ListBackends implements groupservice.Service.ListBackends

func (*HTTPgroupService) ListByPurpose added in v0.0.65

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

ListByPurpose implements groupservice.Service.ListByPurpose

func (*HTTPgroupService) ListModels added in v0.0.65

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

ListModels implements groupservice.Service.ListModels

func (*HTTPgroupService) RemoveBackend added in v0.0.65

func (s *HTTPgroupService) RemoveBackend(ctx context.Context, groupID, backendID string) error

RemoveBackend implements groupservice.Service.RemoveBackend

func (*HTTPgroupService) RemoveModel added in v0.0.65

func (s *HTTPgroupService) RemoveModel(ctx context.Context, groupID, modelID string) error

RemoveModel implements groupservice.Service.RemoveModel

func (*HTTPgroupService) Update added in v0.0.65

Update implements groupservice.Service.Update

Jump to

Keyboard shortcuts

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