local

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrAPINotDeployed                = "local.api_not_deployed"
	ErrAPISpecNotFound               = "local.api_specification_not_found"
	ErrCortexVersionMismatch         = "local.cortex_version_mismatch"
	ErrAPIContainersNotFound         = "local.api_containers_not_found"
	ErrFoundContainersWithoutAPISpec = "local.found_containers_without_api_spec"
	ErrInvalidTensorFlowZip          = "local.invalid_tensorflow_zip"
	ErrFailedToDeleteAPISpec         = "local.failed_to_delete_api_spec"
	ErrDuplicateLocalPort            = "local.duplicate_local_port"
	ErrPortAlreadyInUse              = "local.port_already_in_use"
	ErrUnableToFindAvailablePorts    = "local.unable_to_find_available_ports"
)

Variables

This section is empty.

Functions

func CacheModel

func CacheModel(modelPath string, awsClient *aws.Client) (*spec.LocalModelCache, error)

func CacheModels added in v0.18.0

func CacheModels(apiSpec *spec.API, awsClient *aws.Client) ([]*spec.LocalModelCache, error)

func Delete

func Delete(apiName string, keepCache, deleteForce bool) (schema.DeleteResponse, error)

func DeleteAPI

func DeleteAPI(apiName string) error

func DeleteCachedModels added in v0.18.0

func DeleteCachedModels(apiName string, modelsToDelete []string) error

func DeleteCachedModelsByID added in v0.18.0

func DeleteCachedModelsByID(modelIDs []string) error

func DeleteContainers

func DeleteContainers(apiName string) error

func Deploy

func Deploy(env cliconfig.Environment, configPath string, projectFileList []string, deployDisallowPrompt bool) (schema.DeployResponse, error)

func DeployContainers

func DeployContainers(api *spec.API, awsClient *aws.Client) error

func ErrorAPIContainersNotFound

func ErrorAPIContainersNotFound(apiName string) error

func ErrorAPINotDeployed

func ErrorAPINotDeployed(apiName string) error

func ErrorAPISpecNotFound

func ErrorAPISpecNotFound(apiName string) error

func ErrorCortexVersionMismatch

func ErrorCortexVersionMismatch(apiName string, apiVersion string) error

func ErrorDuplicateLocalPort

func ErrorDuplicateLocalPort(apiName string) error

func ErrorFailedToDeleteAPISpec

func ErrorFailedToDeleteAPISpec(path string, err error) error

func ErrorFoundContainersWithoutAPISpec

func ErrorFoundContainersWithoutAPISpec(apiName string) error

func ErrorInvalidTensorFlowZip

func ErrorInvalidTensorFlowZip() error

func ErrorPortAlreadyInUse

func ErrorPortAlreadyInUse(port int) error

func ErrorUnableToFindAvailablePorts

func ErrorUnableToFindAvailablePorts() error

func FindAPISpec

func FindAPISpec(apiName string) (*spec.API, error)

func GetAPI

func GetAPI(apiName string) (schema.GetAPIResponse, error)

func GetAPIMetrics

func GetAPIMetrics(api *spec.API) (metrics.Metrics, error)

func GetAPIStatus

func GetAPIStatus(api *spec.API) (status.Status, error)

func GetAPIs

func GetAPIs() (schema.GetAPIsResponse, error)

func GetAllRunningContainers

func GetAllRunningContainers() ([]dockertypes.Container, error)

func GetContainersByAPI

func GetContainersByAPI(apiName string) ([]dockertypes.Container, error)

func GetVersionFromAPISpec added in v0.19.0

func GetVersionFromAPISpec(apiName string) (string, error)

func GetVersionFromAPISpecFilePath

func GetVersionFromAPISpecFilePath(path string) string

func ListAPISpecs

func ListAPISpecs() ([]spec.API, error)

func ListVersionMismatchedAPIs

func ListVersionMismatchedAPIs() ([]string, error)

func ResetModelCacheDir

func ResetModelCacheDir(modelDir string) error

func StreamLogs

func StreamLogs(apiName string) error

func UpdateAPI

func UpdateAPI(apiConfig *userconfig.API, configPath string, projectID string, deployDisallowPrompt bool, awsClient *aws.Client) (*spec.API, string, error)

func ValidateLocalAPIs

func ValidateLocalAPIs(apis []userconfig.API, projectFiles ProjectFiles, awsClient *aws.Client) error

Types

type ModelCaches added in v0.18.0

type ModelCaches []*spec.LocalModelCache

func (ModelCaches) IDs added in v0.18.0

func (modelCaches ModelCaches) IDs() string

type ProjectFiles

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

func (ProjectFiles) AllPaths added in v0.19.0

func (projectFiles ProjectFiles) AllPaths() []string

func (ProjectFiles) GetFile

func (projectFiles ProjectFiles) GetFile(path string) ([]byte, error)

func (ProjectFiles) HasDir added in v0.19.0

func (projectFiles ProjectFiles) HasDir(path string) bool

func (ProjectFiles) HasFile added in v0.19.0

func (projectFiles ProjectFiles) HasFile(path string) bool

func (ProjectFiles) ProjectDir added in v0.19.0

func (projectFiles ProjectFiles) ProjectDir() string

Get the absolute path to the project directory

Jump to

Keyboard shortcuts

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