Documentation
¶
Index ¶
- type Platform
- func (mp *Platform) AutoFixConfiguration(ctx context.Context, err error, functionConfig *functionconfig.Config) bool
- func (mp *Platform) BuildAndPushContainerImage(ctx context.Context, buildOptions *containerimagebuilderpusher.BuildOptions) error
- func (mp *Platform) CreateAPIGateway(ctx context.Context, createAPIGatewayOptions *platform.CreateAPIGatewayOptions) error
- func (mp *Platform) CreateFunction(ctx context.Context, createFunctionOptions *platform.CreateFunctionOptions) (*platform.CreateFunctionResult, error)
- func (mp *Platform) CreateFunctionBuild(ctx context.Context, ...) (*platform.CreateFunctionBuildResult, error)
- func (mp *Platform) CreateFunctionEvent(ctx context.Context, ...) error
- func (mp *Platform) CreateFunctionInvocation(ctx context.Context, ...) (*platform.CreateFunctionInvocationResult, error)
- func (mp *Platform) CreateProject(ctx context.Context, createProjectOptions *platform.CreateProjectOptions) error
- func (mp *Platform) DeleteAPIGateway(ctx context.Context, deleteAPIGatewayOptions *platform.DeleteAPIGatewayOptions) error
- func (mp *Platform) DeleteFunction(ctx context.Context, deleteFunctionOptions *platform.DeleteFunctionOptions) error
- func (mp *Platform) DeleteFunctionEvent(ctx context.Context, ...) error
- func (mp *Platform) DeleteProject(ctx context.Context, deleteProjectOptions *platform.DeleteProjectOptions) error
- func (mp *Platform) EnrichFunctionConfig(ctx context.Context, functionConfig *functionconfig.Config) error
- func (mp *Platform) EnsureDefaultProjectExistence(ctx context.Context) error
- func (mp *Platform) FilterFunctionEventsByPermissions(ctx context.Context, permissionOptions *opa.PermissionOptions, ...) ([]platform.FunctionEvent, error)
- func (mp *Platform) FilterFunctionsByPermissions(ctx context.Context, permissionOptions *opa.PermissionOptions, ...) ([]platform.Function, error)
- func (mp *Platform) GetAPIGatewayScrubber() *platform.APIGatewayScrubber
- func (mp *Platform) GetAPIGateways(ctx context.Context, getAPIGatewaysOptions *platform.GetAPIGatewaysOptions) ([]platform.APIGateway, error)
- func (mp *Platform) GetAllowedAuthenticationModes() []string
- func (mp *Platform) GetBaseImageRegistry(registry string, runtime runtime.Runtime) (string, error)
- func (mp *Platform) GetConfig() *platformconfig.Config
- func (mp *Platform) GetContainerBuilderKind() string
- func (mp *Platform) GetDefaultInvokeIPAddresses() ([]string, error)
- func (mp *Platform) GetDefaultRegistryCredentialsSecretName() string
- func (mp *Platform) GetDisableDefaultHttpTrigger() bool
- func (mp *Platform) GetExternalIPAddresses() ([]string, error)
- func (mp *Platform) GetFunctionEvents(ctx context.Context, ...) ([]platform.FunctionEvent, error)
- func (mp *Platform) GetFunctionProject(ctx context.Context, functionConfig *functionconfig.Config) (platform.Project, error)
- func (mp *Platform) GetFunctionReplicaContainers(ctx context.Context, functionConfig *functionconfig.Config, replicaName string) ([]string, error)
- func (mp *Platform) GetFunctionReplicaLogsStream(ctx context.Context, options *platform.GetFunctionReplicaLogsStreamOptions) (io.ReadCloser, error)
- func (mp *Platform) GetFunctionReplicaNames(ctx context.Context, function platform.Function, ...) ([]string, error)
- func (mp *Platform) GetFunctionScrubber() *functionconfig.Scrubber
- func (mp *Platform) GetFunctions(ctx context.Context, getFunctionsOptions *platform.GetFunctionsOptions) ([]platform.Function, error)
- func (mp *Platform) GetHealthCheckMode() platform.HealthCheckMode
- func (mp *Platform) GetImageNamePrefixTemplate() string
- func (mp *Platform) GetName() string
- func (mp *Platform) GetNamespaces(ctx context.Context) ([]string, error)
- func (mp *Platform) GetOnbuildImageRegistry(registry string, runtime runtime.Runtime) (string, error)
- func (mp *Platform) GetOnbuildStages(onbuildArtifacts []runtime.Artifact) ([]string, error)
- func (mp *Platform) GetProcessorLogsAndBriefError(scanner *bufio.Scanner) (string, string)
- func (mp *Platform) GetProjects(ctx context.Context, getProjectsOptions *platform.GetProjectsOptions) ([]platform.Project, error)
- func (mp *Platform) GetRegistryKind() string
- func (mp *Platform) GetRuntimeBuildArgs(runtime runtime.Runtime) map[string]string
- func (mp *Platform) GetScaleToZeroConfiguration() *platformconfig.ScaleToZero
- func (mp *Platform) Initialize(ctx context.Context) error
- func (mp *Platform) InitializeContainerBuilder() error
- func (mp *Platform) QueryOPAFunctionEventPermissions(projectName, functionName, functionEventName string, action opa.Action, ...) (bool, error)
- func (mp *Platform) QueryOPAFunctionPermissions(projectName, functionName string, action opa.Action, ...) (bool, error)
- func (mp *Platform) RedeployFunction(ctx context.Context, redeployFunctionOptions *platform.RedeployFunctionOptions) error
- func (mp *Platform) RenderImageNamePrefixTemplate(projectName string, functionName string) (string, error)
- func (mp *Platform) SaveFunctionDeployLogs(ctx context.Context, functionName, namespace string) error
- func (mp *Platform) SetExternalIPAddresses(externalIPAddresses []string) error
- func (mp *Platform) SetImageNamePrefixTemplate(imageNamePrefixTemplate string)
- func (mp *Platform) TransformOnbuildArtifactPaths(onbuildArtifacts []runtime.Artifact) (map[string]string, error)
- func (mp *Platform) UpdateAPIGateway(ctx context.Context, updateAPIGatewayOptions *platform.UpdateAPIGatewayOptions) error
- func (mp *Platform) UpdateFunction(ctx context.Context, updateFunctionOptions *platform.UpdateFunctionOptions) error
- func (mp *Platform) UpdateFunctionEvent(ctx context.Context, ...) error
- func (mp *Platform) UpdateProject(ctx context.Context, updateProjectOptions *platform.UpdateProjectOptions) error
- func (mp *Platform) ValidateFunctionConfig(ctx context.Context, functionConfig *functionconfig.Config) error
- func (mp *Platform) WaitForProjectResourcesDeletion(ctx context.Context, projectMeta *platform.ProjectMeta, duration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct { mock.Mock // a mock only field signifying whether, during the CreateFunction call, the CreationStateUpdated channel // should be populated. This is used to mock failures before/after the update on the production types CreateFunctionCreationStateUpdated bool }
Platform defines the interface that any underlying function platform must provide for nuclio to run over it
func (*Platform) AutoFixConfiguration ¶
func (*Platform) BuildAndPushContainerImage ¶
func (mp *Platform) BuildAndPushContainerImage(ctx context.Context, buildOptions *containerimagebuilderpusher.BuildOptions) error
func (*Platform) CreateAPIGateway ¶
func (mp *Platform) CreateAPIGateway(ctx context.Context, createAPIGatewayOptions *platform.CreateAPIGatewayOptions) error
CreateAPIGateway creates and deploys a new api gateway
func (*Platform) CreateFunction ¶
func (mp *Platform) CreateFunction(ctx context.Context, createFunctionOptions *platform.CreateFunctionOptions) (*platform.CreateFunctionResult, error)
CreateFunction will deploy a processor image to the platform (optionally building it, if source is provided)
func (*Platform) CreateFunctionBuild ¶
func (mp *Platform) CreateFunctionBuild(ctx context.Context, createFunctionBuildOptions *platform.CreateFunctionBuildOptions) (*platform.CreateFunctionBuildResult, error)
CreateFunctionBuild will locally build a processor image and return its name (or the error)
func (*Platform) CreateFunctionEvent ¶
func (mp *Platform) CreateFunctionEvent(ctx context.Context, createFunctionEventOptions *platform.CreateFunctionEventOptions) error
CreateFunctionEvent will create a new function event that can later be used as a template from which to invoke functions
func (*Platform) CreateFunctionInvocation ¶
func (mp *Platform) CreateFunctionInvocation(ctx context.Context, createFunctionInvocationOptions *platform.CreateFunctionInvocationOptions) (*platform.CreateFunctionInvocationResult, error)
CreateFunctionInvocation will invoke a previously deployed function
func (*Platform) CreateProject ¶
func (mp *Platform) CreateProject(ctx context.Context, createProjectOptions *platform.CreateProjectOptions) error
CreateProject will probably create a new project
func (*Platform) DeleteAPIGateway ¶
func (mp *Platform) DeleteAPIGateway(ctx context.Context, deleteAPIGatewayOptions *platform.DeleteAPIGatewayOptions) error
DeleteAPIGateway will delete a previously deployed api gateway
func (*Platform) DeleteFunction ¶
func (mp *Platform) DeleteFunction(ctx context.Context, deleteFunctionOptions *platform.DeleteFunctionOptions) error
DeleteFunction will delete a previously deployed function
func (*Platform) DeleteFunctionEvent ¶
func (mp *Platform) DeleteFunctionEvent(ctx context.Context, deleteFunctionEventOptions *platform.DeleteFunctionEventOptions) error
DeleteFunctionEvent will delete a previously existing function event
func (*Platform) DeleteProject ¶
func (mp *Platform) DeleteProject(ctx context.Context, deleteProjectOptions *platform.DeleteProjectOptions) error
DeleteProject will delete a previously existing project
func (*Platform) EnrichFunctionConfig ¶
func (*Platform) EnsureDefaultProjectExistence ¶
func (*Platform) FilterFunctionEventsByPermissions ¶
func (mp *Platform) FilterFunctionEventsByPermissions(ctx context.Context, permissionOptions *opa.PermissionOptions, functionEvents []platform.FunctionEvent) ([]platform.FunctionEvent, error)
func (*Platform) FilterFunctionsByPermissions ¶
func (*Platform) GetAPIGatewayScrubber ¶
func (mp *Platform) GetAPIGatewayScrubber() *platform.APIGatewayScrubber
func (*Platform) GetAPIGateways ¶
func (mp *Platform) GetAPIGateways(ctx context.Context, getAPIGatewaysOptions *platform.GetAPIGatewaysOptions) ([]platform.APIGateway, error)
GetAPIGateways will list existing api gateways
func (*Platform) GetAllowedAuthenticationModes ¶
func (*Platform) GetBaseImageRegistry ¶
func (*Platform) GetConfig ¶
func (mp *Platform) GetConfig() *platformconfig.Config
func (*Platform) GetContainerBuilderKind ¶
func (*Platform) GetDefaultInvokeIPAddresses ¶
func (*Platform) GetDefaultRegistryCredentialsSecretName ¶
func (*Platform) GetDisableDefaultHttpTrigger ¶
func (*Platform) GetExternalIPAddresses ¶
GetExternalIPAddresses returns the external IP addresses invocations will use.
func (*Platform) GetFunctionEvents ¶
func (mp *Platform) GetFunctionEvents(ctx context.Context, getFunctionEventsOptions *platform.GetFunctionEventsOptions) ([]platform.FunctionEvent, error)
GetFunctionEvents will list existing function events
func (*Platform) GetFunctionProject ¶
func (mp *Platform) GetFunctionProject(ctx context.Context, functionConfig *functionconfig.Config) (platform.Project, error)
GetFunctionProject returns project instance for specific function
func (*Platform) GetFunctionReplicaContainers ¶
func (*Platform) GetFunctionReplicaLogsStream ¶
func (mp *Platform) GetFunctionReplicaLogsStream(ctx context.Context, options *platform.GetFunctionReplicaLogsStreamOptions) (io.ReadCloser, error)
GetFunctionReplicaLogsStream return the function instance (Kubernetes - Pod / Docker - Container) logs stream
func (*Platform) GetFunctionReplicaNames ¶
func (mp *Platform) GetFunctionReplicaNames(ctx context.Context, function platform.Function, permissionOptions opa.PermissionOptions) ([]string, error)
GetFunctionReplicaNames returns function replica names (Pod / Container names)
func (*Platform) GetFunctionScrubber ¶
func (mp *Platform) GetFunctionScrubber() *functionconfig.Scrubber
func (*Platform) GetFunctions ¶
func (mp *Platform) GetFunctions(ctx context.Context, getFunctionsOptions *platform.GetFunctionsOptions) ([]platform.Function, error)
GetFunctions will list existing functions
func (*Platform) GetHealthCheckMode ¶
func (mp *Platform) GetHealthCheckMode() platform.HealthCheckMode
GetHealthCheckMode returns the healthcheck mode the platform requires
func (*Platform) GetImageNamePrefixTemplate ¶
func (*Platform) GetNamespaces ¶
GetNamespaces returns the namespaces
func (*Platform) GetOnbuildImageRegistry ¶
func (*Platform) GetOnbuildStages ¶
func (*Platform) GetProcessorLogsAndBriefError ¶
func (*Platform) GetProjects ¶
func (mp *Platform) GetProjects(ctx context.Context, getProjectsOptions *platform.GetProjectsOptions) ([]platform.Project, error)
GetProjects will list existing projects
func (*Platform) GetRegistryKind ¶
func (*Platform) GetRuntimeBuildArgs ¶
func (*Platform) GetScaleToZeroConfiguration ¶
func (mp *Platform) GetScaleToZeroConfiguration() *platformconfig.ScaleToZero
func (*Platform) InitializeContainerBuilder ¶
func (*Platform) QueryOPAFunctionEventPermissions ¶
func (*Platform) QueryOPAFunctionPermissions ¶
func (*Platform) RedeployFunction ¶
func (*Platform) RenderImageNamePrefixTemplate ¶
func (*Platform) SaveFunctionDeployLogs ¶
func (*Platform) SetExternalIPAddresses ¶
SetExternalIPAddresses configures the IP addresses invocations will use.
func (*Platform) SetImageNamePrefixTemplate ¶
func (*Platform) TransformOnbuildArtifactPaths ¶
func (*Platform) UpdateAPIGateway ¶
func (mp *Platform) UpdateAPIGateway(ctx context.Context, updateAPIGatewayOptions *platform.UpdateAPIGatewayOptions) error
UpdateAPIGateway will update a previously deployed api gateway
func (*Platform) UpdateFunction ¶
func (mp *Platform) UpdateFunction(ctx context.Context, updateFunctionOptions *platform.UpdateFunctionOptions) error
UpdateFunction will update a previously deployed function
func (*Platform) UpdateFunctionEvent ¶
func (mp *Platform) UpdateFunctionEvent(ctx context.Context, updateFunctionEventOptions *platform.UpdateFunctionEventOptions) error
UpdateFunctionEvent will update a previously existing function event
func (*Platform) UpdateProject ¶
func (mp *Platform) UpdateProject(ctx context.Context, updateProjectOptions *platform.UpdateProjectOptions) error
UpdateProject will update a previously existing project