Documentation ¶
Index ¶
- Constants
- func MapKey(m *metav1.ObjectMeta) string
- func Save(data []byte, specDir string, specFile string) error
- func SpecSave(resource interface{}, specFile string) error
- type ArchiveUploadSpec
- type DeploymentConfig
- type FissionResources
- type Location
- type ResourceApplyStatus
- type SourceMap
- type TypeMeta
Constants ¶
const ( FISSION_DEPLOYMENT_NAME_KEY = "fission-name" FISSION_DEPLOYMENT_UID_KEY = "fission-uid" SPEC_API_VERSION = "fission.io/v1" ARCHIVE_URL_PREFIX string = "archive://" SPEC_README = `` /* 1789-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func MapKey ¶
func MapKey(m *metav1.ObjectMeta) string
Types ¶
type ArchiveUploadSpec ¶
type ArchiveUploadSpec struct { // TypeMeta describes the type of this object. It is inlined. The Kind // field should always be "ArchiveUploadSpec". TypeMeta `json:",inline"` // Name is a local name that can be used to reference this archive. It // must be unique; duplicate names will cause an error while handling // specs. Name string `json:"name"` // RootDir specifies the root that the globs below are relative to. It // is optional and defaults to the parent directory of the spec // directory: for example, if the deployment config is at // /path/to/project/specs/config.yaml, the RootDir is /path/to/project. RootDir string `json:"rootdir,omitempty"` // IncludeGlobs is a list of Unix shell globs to include IncludeGlobs []string `json:"include,omitempty"` // ExcludeGlobs is a list of globs to exclude from the set specified by // IncludeGlobs. ExcludeGlobs []string `json:"exclude,omitempty"` }
ArchiveUploadSpec specifies a set of files to be archived and uploaded.
The resulting archive can be referenced as archive://<Name> in PackageSpecs, using the name specified in the archive. The fission spec applier will replace the archive:// URL with a real HTTP URL after uploading the file.
type DeploymentConfig ¶
type DeploymentConfig struct { // TypeMeta describes the type of this object. It is inlined. The Kind // field should always be "DeploymentConfig". TypeMeta `json:",inline"` // Name is a user-friendly name for the deployment. It is also stored in // all uploaded resources as an annotation. Name string `json:"name"` // UID uniquely identifies the deployment. It is stored as a label and // used to find resources to clean up when local specs are changed. UID string `json:"uid"` }
DeploymentConfig is the global configuration for a set of Fission specs.
type FissionResources ¶
type FissionResources struct { DeploymentConfig DeploymentConfig Packages []fv1.Package Functions []fv1.Function Environments []fv1.Environment HttpTriggers []fv1.HTTPTrigger KubernetesWatchTriggers []fv1.KubernetesWatchTrigger TimeTriggers []fv1.TimeTrigger MessageQueueTriggers []fv1.MessageQueueTrigger ArchiveUploadSpecs []ArchiveUploadSpec SourceMap SourceMap }
CLI spec types
func (*FissionResources) ParseYaml ¶
func (fr *FissionResources) ParseYaml(b []byte, loc *Location) error
ParseYaml takes one yaml document, figures out its type, parses it, and puts it in the right list in the given fission resources set.
func (*FissionResources) SpecExists ¶
func (fr *FissionResources) SpecExists(resource interface{}, compareMetadata bool, compareSpec bool) *metav1.ObjectMeta
Returns metadata if the given resource exists in the specs, nil otherwise. compareMetadata and compareSpec control how the equality check is performed.
type ResourceApplyStatus ¶
type ResourceApplyStatus struct { Created []*metav1.ObjectMeta Updated []*metav1.ObjectMeta Deleted []*metav1.ObjectMeta }
CLI spec types