Documentation
¶
Overview ¶
Package function builds and packages function archives for upload.
Index ¶
- type Package
- type RuntimeCatalog
- type Service
- func (s Service) CreateSchedulerByID(ctx context.Context, functionID uuid.UUID, input api.FunctionSchedulerInput) (*apiclient.FunctionScheduler, error)
- func (s Service) DeleteByID(ctx context.Context, functionID uuid.UUID) error
- func (s Service) DeleteScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) error
- func (s Service) DeployPackage(ctx context.Context, pkg Package) (*apiclient.Function, error)
- func (s Service) DeployPackageBatch(ctx context.Context, packages []Package) (*apiclient.BatchFunctionDeployResponse, error)
- func (s Service) DeploymentLogs(ctx context.Context, functionID, deploymentID uuid.UUID, limit int, ...) (*apiclient.GetLogsResponse, error)
- func (s Service) DisableScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) (*apiclient.FunctionScheduler, error)
- func (s Service) EnableScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) (*apiclient.FunctionScheduler, error)
- func (s Service) Get(ctx context.Context, identifier string) (*apiclient.Function, error)
- func (s Service) ListPage(ctx context.Context, page, limit int) (*apiclient.PaginatedFunctions, error)
- func (s Service) ListRuntimes(ctx context.Context) ([]apiclient.FunctionRuntimeOption, error)
- func (s Service) ListSchedulers(ctx context.Context, identifier string) (*apiclient.Function, *apiclient.FunctionSchedulerListResponse, error)
- func (s Service) Resolve(ctx context.Context, identifier string) (*apiclient.Function, error)
- func (s Service) ResolveDeployment(ctx context.Context, functionID uuid.UUID, deploymentID string) (*apiclient.FunctionDeployment, error)
- func (s Service) RuntimeCatalog(ctx context.Context) (RuntimeCatalog, error)
- func (s Service) RuntimeLogs(ctx context.Context, functionID uuid.UUID, limit int, nextToken string) (*apiclient.GetLogsResponse, error)
- func (s Service) UpdateVisibility(ctx context.Context, identifier string, isPublic bool) (*apiclient.Function, error)
- type SharedLibrary
- type SourceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
Package contains one function source archive ready for API upload.
func PackageSource ¶
func PackageSource(info SourceInfo, baseDir string) (*Package, error)
PackageSource packages a cloud function source bundle with manifests and shared libraries.
type RuntimeCatalog ¶
type RuntimeCatalog struct {
// contains filtered or unexported fields
}
RuntimeCatalog indexes API-provided default runtime metadata for local source detection.
func RuntimeCatalogFromOptions ¶
func RuntimeCatalogFromOptions(options []apiclient.FunctionRuntimeOption) RuntimeCatalog
RuntimeCatalogFromOptions converts the API runtime catalog to scanner/package metadata.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service performs authenticated Volcano function workflows.
func NewService ¶
func NewService(deps cliruntime.Deps) Service
NewService returns a function service.
func (Service) CreateSchedulerByID ¶
func (s Service) CreateSchedulerByID(ctx context.Context, functionID uuid.UUID, input api.FunctionSchedulerInput) (*apiclient.FunctionScheduler, error)
CreateSchedulerByID creates one scheduler for the given function ID.
func (Service) DeleteByID ¶
DeleteByID starts deleting one function by ID.
func (Service) DeleteScheduler ¶
func (s Service) DeleteScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) error
DeleteScheduler deletes one scheduler for a function.
func (Service) DeployPackage ¶
DeployPackage deploys one packaged function source archive.
func (Service) DeployPackageBatch ¶
func (s Service) DeployPackageBatch(ctx context.Context, packages []Package) (*apiclient.BatchFunctionDeployResponse, error)
DeployPackageBatch deploys one batch of packaged function source archives.
func (Service) DeploymentLogs ¶
func (s Service) DeploymentLogs(ctx context.Context, functionID, deploymentID uuid.UUID, limit int, nextToken string) (*apiclient.GetLogsResponse, error)
DeploymentLogs returns one build log page for a function deployment.
func (Service) DisableScheduler ¶
func (s Service) DisableScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) (*apiclient.FunctionScheduler, error)
DisableScheduler disables one scheduler for a function.
func (Service) EnableScheduler ¶
func (s Service) EnableScheduler(ctx context.Context, identifier string, schedulerID uuid.UUID) (*apiclient.FunctionScheduler, error)
EnableScheduler enables one scheduler for a function.
func (Service) ListPage ¶
func (s Service) ListPage(ctx context.Context, page, limit int) (*apiclient.PaginatedFunctions, error)
ListPage returns one function page in the current project.
func (Service) ListRuntimes ¶
ListRuntimes returns the function runtime catalog.
func (Service) ListSchedulers ¶
func (s Service) ListSchedulers(ctx context.Context, identifier string) (*apiclient.Function, *apiclient.FunctionSchedulerListResponse, error)
ListSchedulers returns schedulers configured for a function.
func (Service) Resolve ¶
Resolve returns a function by normalized name/path or UUID in the current project.
func (Service) ResolveDeployment ¶
func (s Service) ResolveDeployment(ctx context.Context, functionID uuid.UUID, deploymentID string) (*apiclient.FunctionDeployment, error)
ResolveDeployment returns a deployment by ID, paging internally.
func (Service) RuntimeCatalog ¶
func (s Service) RuntimeCatalog(ctx context.Context) (RuntimeCatalog, error)
RuntimeCatalog returns deploy runtime metadata from the function runtime catalog.
type SharedLibrary ¶
type SharedLibrary struct {
}
SharedLibrary represents a shared function library file or directory.
func FindSharedLibraries ¶
func FindSharedLibraries(baseDir string) ([]SharedLibrary, error)
FindSharedLibraries finds underscore-prefixed files and directories below volcano/ and volcano/functions/.
type SourceInfo ¶
type SourceInfo struct {
Path string
Name string
Runtime apiclient.FunctionRuntimeOption
IsDir bool
}
SourceInfo represents one discovered deployable function source.
func ScanSources ¶
func ScanSources(baseDir string, catalog RuntimeCatalog) ([]SourceInfo, error)
ScanSources scans volcano/functions for top-level function files and directories.