resources

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrOperationIsOnlySupportedForKind               = "resources.operation_is_only_supported_for_kind"
	ErrAPINotDeployed                                = "resources.api_not_deployed"
	ErrAPIIDNotFound                                 = "resources.api_id_not_found"
	ErrCannotChangeTypeOfDeployedAPI                 = "resources.cannot_change_kind_of_deployed_api"
	ErrCannotChangeProtocolWhenUsedByTrafficSplitter = "resources.cannot_change_protocol_when_used_by_traffic_splitter"
	ErrNoAvailableNodeComputeLimit                   = "resources.no_available_node_compute_limit"
	ErrJobIDRequired                                 = "resources.job_id_required"
	ErrRealtimeAPIUsedByTrafficSplitter              = "resources.realtime_api_used_by_traffic_splitter"
	ErrAPIsNotDeployed                               = "resources.apis_not_deployed"
	ErrGRPCNotSupportedForTrafficSplitter            = "resources.grpc_not_supported_for_traffic_splitter"
)

Variables

This section is empty.

Functions

func DeleteAPI

func DeleteAPI(apiName string, keepCache bool) (*schema.DeleteResponse, error)

func Deploy

func Deploy(projectBytes []byte, configFileName string, configBytes []byte, force bool) ([]schema.DeployResult, error)

func ErrorAPIIDNotFound added in v0.23.0

func ErrorAPIIDNotFound(apiName string, apiID string) error

func ErrorAPINotDeployed

func ErrorAPINotDeployed(apiName string) error

func ErrorAPIUsedByTrafficSplitter

func ErrorAPIUsedByTrafficSplitter(trafficSplitters []string) error

func ErrorAPIsNotDeployed

func ErrorAPIsNotDeployed(notDeployedAPIs []string) error

func ErrorCannotChangeKindOfDeployedAPI

func ErrorCannotChangeKindOfDeployedAPI(name string, newKind, prevKind userconfig.Kind) error

func ErrorCannotChangeProtocolWhenUsedByTrafficSplitter added in v0.32.0

func ErrorCannotChangeProtocolWhenUsedByTrafficSplitter(protocolChangingAPIName string, trafficSplitters []string) error

func ErrorGRPCNotSupportedForTrafficSplitter added in v0.32.0

func ErrorGRPCNotSupportedForTrafficSplitter(grpcAPIName string) error

func ErrorNoAvailableNodeComputeLimit

func ErrorNoAvailableNodeComputeLimit(resource string, reqStr string, maxStr string) error

func ErrorOperationIsOnlySupportedForKind

func ErrorOperationIsOnlySupportedForKind(resource operator.DeployedResource, supportedKind userconfig.Kind, supportedKinds ...userconfig.Kind) error

func ExclusiveFilterAPIsByKind

func ExclusiveFilterAPIsByKind(apis []userconfig.API, kindsToExclude ...userconfig.Kind) []userconfig.API

func GetAPI

func GetAPI(apiName string) ([]schema.APIResponse, error)

func GetAPIByID added in v0.23.0

func GetAPIByID(apiName string, apiID string) ([]schema.APIResponse, error)

func GetAPIs

func GetAPIs() ([]schema.APIResponse, error)

func GetDeployedResourceByName

func GetDeployedResourceByName(resourceName string) (*operator.DeployedResource, error)

Returns an error if resource doesn't exist

func GetDeployedResourceByNameOrNil

func GetDeployedResourceByNameOrNil(resourceName string) (*operator.DeployedResource, error)

func InclusiveFilterAPIsByKind

func InclusiveFilterAPIsByKind(apis []userconfig.API, kindsToInclude ...userconfig.Kind) []userconfig.API

InclusiveFilterAPIsByKind includes only provided Kinds

func Patch added in v0.24.0

func Patch(configBytes []byte, configFileName string, force bool) ([]schema.DeployResult, error)

func RefreshAPI

func RefreshAPI(apiName string, force bool) (string, error)

func UpdateAPI

func UpdateAPI(apiConfig *userconfig.API, projectID string, force bool) (*schema.APIResponse, string, error)

func ValidateClusterAPIs

func ValidateClusterAPIs(apis []userconfig.API, projectFiles spec.ProjectFiles) error

Types

type ProjectFiles

type ProjectFiles struct {
	ProjectByteMap map[string][]byte
}

func (ProjectFiles) AllPaths

func (projectFiles ProjectFiles) AllPaths() []string

func (ProjectFiles) GetFile

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

func (ProjectFiles) HasDir

func (projectFiles ProjectFiles) HasDir(path string) bool

func (ProjectFiles) HasFile

func (projectFiles ProjectFiles) HasFile(path string) bool

Directories

Path Synopsis
job

Jump to

Keyboard shortcuts

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