Documentation
¶
Overview ¶
Copyright 2020 Cortex Labs, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CacheLocalModels(apiSpec *spec.API) error
- func ContainersHaveAPINameVolume(containers []dockertypes.Container) bool
- func Delete(apiName string, keepCache, deleteForce bool) (schema.DeleteResponse, error)
- func DeleteAPI(apiName string) error
- func DeleteContainers(apiName string) error
- func DeleteVolume(volumeName string) error
- func Deploy(env cliconfig.Environment, configPath string, projectFileList []string, ...) ([]schema.DeployResult, error)
- func DeployContainers(api *spec.API, awsClient *aws.Client) error
- func ErrorAPIContainersNotFound(apiName string) error
- func ErrorAPINotDeployed(apiName string) error
- func ErrorAPISpecNotFound(apiName string) error
- func ErrorBindDockerInDocker(err error) error
- func ErrorCortexVersionMismatch(apiName string, apiVersion string) error
- func ErrorDuplicateLocalPort(apiName string) error
- func ErrorFailedToDeleteAPISpec(path string, err error) error
- func ErrorFoundContainersWithoutAPISpec(apiName string) error
- func ErrorInvalidTensorFlowZip() error
- func ErrorPortAlreadyInUse(port int) error
- func ErrorUnableToFindAvailablePorts() error
- func FindAPISpec(apiName string) (*spec.API, error)
- func GetAPI(apiName string) ([]schema.APIResponse, error)
- func GetAPIMetrics(api *spec.API) (metrics.Metrics, error)
- func GetAPIStatus(api *spec.API) (status.Status, error)
- func GetAPIs() ([]schema.APIResponse, error)
- func GetAllRunningContainers() ([]dockertypes.Container, error)
- func GetContainersByAPI(apiName string) ([]dockertypes.Container, error)
- func GetVersionFromAPISpec(apiName string) (string, error)
- func GetVersionFromAPISpecFilePath(path string) string
- func ListAPISpecs() ([]spec.API, error)
- func ListVersionMismatchedAPIs() ([]string, error)
- func StreamLogs(apiName string) error
- func UpdateAPI(apiConfig *userconfig.API, models []spec.CuratedModelResource, ...) (*schema.APIResponse, string, error)
- func ValidateLocalAPIs(apis []userconfig.API, models *[]spec.CuratedModelResource, ...) error
- type ModelCaches
- type ProjectFiles
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" ErrBindDockerInDocker = "local.bind_docker_in_docker" )
Variables ¶
View Source
var OutputType flags.OutputType = flags.PrettyOutputType
Can be overwritten by CLI commands
Functions ¶
func CacheLocalModels ¶ added in v0.22.0
func ContainersHaveAPINameVolume ¶ added in v0.22.0
func ContainersHaveAPINameVolume(containers []dockertypes.Container) bool
func Delete ¶
func Delete(apiName string, keepCache, deleteForce bool) (schema.DeleteResponse, error)
func DeleteContainers ¶
func DeleteVolume ¶ added in v0.22.0
func Deploy ¶
func Deploy(env cliconfig.Environment, configPath string, projectFileList []string, deployDisallowPrompt bool) ([]schema.DeployResult, error)
func ErrorAPINotDeployed ¶
func ErrorAPISpecNotFound ¶
func ErrorBindDockerInDocker ¶ added in v0.20.0
func ErrorDuplicateLocalPort ¶
func ErrorInvalidTensorFlowZip ¶
func ErrorInvalidTensorFlowZip() error
func ErrorPortAlreadyInUse ¶
func ErrorUnableToFindAvailablePorts ¶
func ErrorUnableToFindAvailablePorts() error
func GetAPIs ¶
func GetAPIs() ([]schema.APIResponse, 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 ListAPISpecs ¶
func StreamLogs ¶
func UpdateAPI ¶
func UpdateAPI(apiConfig *userconfig.API, models []spec.CuratedModelResource, configPath string, projectID string, deployDisallowPrompt bool, awsClient *aws.Client) (*schema.APIResponse, string, error)
func ValidateLocalAPIs ¶
func ValidateLocalAPIs(apis []userconfig.API, models *[]spec.CuratedModelResource, 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) 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
Click to show internal directories.
Click to hide internal directories.