Documentation ¶
Index ¶
- Variables
- func ContextWithRpaasManager(ctx context.Context, manager RpaasManager) context.Context
- func IsConflictError(err error) bool
- func IsNotFoundError(err error) bool
- func IsNotModifiedError(err error) bool
- func IsValidationError(err error) bool
- type AutoscaleHandler
- type BindAppArgs
- type CacheManager
- type CertificateData
- type CommonTerminalArgs
- type ConfigurationBlock
- type ConfigurationBlockHandler
- type ConflictError
- type CreateArgs
- type DebugArgs
- type ExecArgs
- type ExtraFileHandler
- type File
- type Flavor
- type LogArgs
- type NotFoundError
- type NotModifiedError
- type Plan
- type PodStatus
- type PodStatusMap
- type PurgeCacheArgs
- type PurgeCacheBulkResult
- type Route
- type RouteHandler
- type RpaasManager
- type UpdateInstanceArgs
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoSuchExtraFile = &NotFoundError{Msg: "extra file not found"} ErrExtraFileAlreadyExists = &ConflictError{Msg: "file already exists"} )
View Source
var CronParser = cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow)
View Source
var (
ErrNoPoolDefined = errors.New("No pool defined")
)
Functions ¶
func ContextWithRpaasManager ¶ added in v0.9.3
func ContextWithRpaasManager(ctx context.Context, manager RpaasManager) context.Context
func IsConflictError ¶
func IsNotFoundError ¶
func IsNotModifiedError ¶ added in v0.32.0
func IsValidationError ¶
Types ¶
type AutoscaleHandler ¶ added in v0.6.0
type BindAppArgs ¶
type CacheManager ¶
type CertificateData ¶ added in v0.6.3
type CommonTerminalArgs ¶ added in v0.37.0
type CommonTerminalArgs struct { Pod string Container string TerminalWidth uint16 TerminalHeight uint16 TTY bool Interactive bool Stdin io.Reader Stdout io.Writer Stderr io.Writer }
func (*CommonTerminalArgs) GetInteractive ¶ added in v0.37.0
func (c *CommonTerminalArgs) GetInteractive() bool
func (*CommonTerminalArgs) SetStderr ¶ added in v0.37.0
func (c *CommonTerminalArgs) SetStderr(w io.Writer)
func (*CommonTerminalArgs) SetStdin ¶ added in v0.37.0
func (c *CommonTerminalArgs) SetStdin(r io.Reader)
func (*CommonTerminalArgs) SetStdout ¶ added in v0.37.0
func (c *CommonTerminalArgs) SetStdout(w io.Writer)
type ConfigurationBlock ¶
type ConfigurationBlockHandler ¶
type ConfigurationBlockHandler interface { // DeleteBlock removes the configuration block named by blockName. It returns // a nil error meaning it was successful, otherwise a non-nil one which // describes the reached problem. DeleteBlock(ctx context.Context, instanceName, blockName string) error // ListBlocks returns all custom configuration blocks from instance (which // name is instanceName). It returns a nil error meaning it was successful, // otherwise a non-nil one which describes the reached problem. ListBlocks(ctx context.Context, instanceName string) ([]ConfigurationBlock, error) // UpdateBlock overwrites the older configuration block content with the one. // Whether the configuration block entry does not exist, it will already be // created with the new content. It returns a nil error meaning it was // successful, otherwise a non-nil one which describes the reached problem. UpdateBlock(ctx context.Context, instanceName string, block ConfigurationBlock) error }
ConfigurationBlockHandler defines some functions to handle the custom configuration blocks from an instance.
type ConflictError ¶
func (ConflictError) Error ¶
func (e ConflictError) Error() string
func (ConflictError) IsConflict ¶
func (ConflictError) IsConflict() bool
func (ConflictError) Unwrap ¶ added in v0.31.0
func (e ConflictError) Unwrap() error
type CreateArgs ¶
type CreateArgs struct { Name string `form:"name"` Team string `form:"team"` Plan string `form:"plan"` Description string `form:"description"` Tags []string `form:"tags"` Parameters map[string]interface{} `form:"parameters"` }
func (CreateArgs) Annotations ¶ added in v0.33.3
func (args CreateArgs) Annotations() (map[string]string, error)
func (CreateArgs) Flavors ¶ added in v0.8.2
func (args CreateArgs) Flavors() []string
func (CreateArgs) IP ¶
func (args CreateArgs) IP() string
func (CreateArgs) LoadBalancerName ¶ added in v0.9.3
func (args CreateArgs) LoadBalancerName() string
func (CreateArgs) PlanOverride ¶
func (args CreateArgs) PlanOverride() string
type DebugArgs ¶ added in v0.37.0
type DebugArgs struct { Command []string Image string CommonTerminalArgs }
type ExecArgs ¶ added in v0.9.3
type ExecArgs struct { Command []string CommonTerminalArgs }
type ExtraFileHandler ¶
type ExtraFileHandler interface { CreateExtraFiles(ctx context.Context, instanceName string, files ...File) error DeleteExtraFiles(ctx context.Context, instanceName string, filenames ...string) error GetExtraFiles(ctx context.Context, instanceName string) ([]File, error) UpdateExtraFiles(ctx context.Context, instanceName string, files ...File) error }
type File ¶
func (File) MarshalJSON ¶
type NotFoundError ¶
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
func (NotFoundError) IsNotFound ¶
func (NotFoundError) IsNotFound() bool
func (NotFoundError) Unwrap ¶ added in v0.31.0
func (e NotFoundError) Unwrap() error
type NotModifiedError ¶ added in v0.32.0
func (NotModifiedError) Error ¶ added in v0.32.0
func (e NotModifiedError) Error() string
func (NotModifiedError) IsNotModified ¶ added in v0.32.0
func (NotModifiedError) IsNotModified() bool
func (NotModifiedError) Unwrap ¶ added in v0.32.0
func (e NotModifiedError) Unwrap() error
type PodStatusMap ¶
type PurgeCacheArgs ¶
type PurgeCacheBulkResult ¶ added in v0.9.3
type RouteHandler ¶
type RpaasManager ¶
type RpaasManager interface { ConfigurationBlockHandler ExtraFileHandler RouteHandler AutoscaleHandler UpdateCertificate(ctx context.Context, instance, name string, cert tls.Certificate) error DeleteCertificate(ctx context.Context, instance, name string) error GetCertificates(ctx context.Context, instanceName string) ([]CertificateData, error) CreateInstance(ctx context.Context, args CreateArgs) error DeleteInstance(ctx context.Context, name string) error UpdateInstance(ctx context.Context, name string, args UpdateInstanceArgs) error GetInstance(ctx context.Context, name string) (*v1alpha1.RpaasInstance, error) GetInstanceAddress(ctx context.Context, name string) (string, error) GetInstanceStatus(ctx context.Context, name string) (*nginxv1alpha1.Nginx, PodStatusMap, error) Scale(ctx context.Context, name string, replicas int32) error GetPlans(ctx context.Context) ([]Plan, error) GetFlavors(ctx context.Context) ([]Flavor, error) BindApp(ctx context.Context, instanceName string, args BindAppArgs) error UnbindApp(ctx context.Context, instanceName, appName string) error PurgeCache(ctx context.Context, instanceName string, args PurgeCacheArgs) (int, error) GetInstanceInfo(ctx context.Context, instanceName string) (*clientTypes.InstanceInfo, error) Exec(ctx context.Context, instanceName string, args ExecArgs) error Debug(ctx context.Context, instanceName string, args DebugArgs) error Log(ctx context.Context, intanceName string, args LogArgs) error AddUpstream(ctx context.Context, instanceName string, upstream v1alpha1.AllowedUpstream) error GetUpstreams(ctx context.Context, name string) ([]v1alpha1.AllowedUpstream, error) DeleteUpstream(ctx context.Context, instance string, upstream v1alpha1.AllowedUpstream) error GetCertManagerRequests(ctx context.Context, instanceName string) ([]clientTypes.CertManager, error) UpdateCertManagerRequest(ctx context.Context, instanceName string, in clientTypes.CertManager) error DeleteCertManagerRequest(ctx context.Context, instanceName, issuer string) error }
func RpaasManagerFromContext ¶ added in v0.9.3
func RpaasManagerFromContext(ctx context.Context) RpaasManager
type UpdateInstanceArgs ¶ added in v0.3.0
type UpdateInstanceArgs struct { Team string `form:"team"` Description string `form:"description"` Plan string `form:"plan"` Tags []string `form:"tags"` Parameters map[string]interface{} `form:"parameters"` }
func (UpdateInstanceArgs) Annotations ¶ added in v0.33.3
func (args UpdateInstanceArgs) Annotations() (map[string]string, error)
func (UpdateInstanceArgs) Flavors ¶ added in v0.8.2
func (args UpdateInstanceArgs) Flavors() []string
func (UpdateInstanceArgs) IP ¶ added in v0.8.2
func (args UpdateInstanceArgs) IP() string
func (UpdateInstanceArgs) LoadBalancerName ¶ added in v0.9.3
func (args UpdateInstanceArgs) LoadBalancerName() string
func (UpdateInstanceArgs) PlanOverride ¶ added in v0.8.2
func (args UpdateInstanceArgs) PlanOverride() string
type ValidationError ¶
func (ValidationError) Error ¶
func (e ValidationError) Error() string
func (ValidationError) IsValidation ¶
func (ValidationError) IsValidation() bool
func (ValidationError) Unwrap ¶ added in v0.31.0
func (e ValidationError) Unwrap() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.