fetcher

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveUploadRequest added in v1.8.0

type ArchiveUploadRequest struct {
	Filename       string `json:"filename"`
	StorageSvcUrl  string `json:"storagesvcurl"`
	ArchivePackage bool   `json:"archivepackage"`
}

ArchiveUploadRequest send from builder manager describes which deployment package should be upload to storage service.

type ArchiveUploadResponse added in v1.8.0

type ArchiveUploadResponse struct {
	ArchiveDownloadUrl string       `json:"archiveDownloadUrl"`
	Checksum           fv1.Checksum `json:"checksum"`
}

ArchiveUploadResponse defines the download url of an archive and its checksum.

type FetchRequestType added in v1.8.0

type FetchRequestType int

Fission-Environment interface. The following types are not exposed in the Fission API, but rather used by Fission to talk to environments.

type Fetcher

type Fetcher struct {
	Info PodInfo
	// contains filtered or unexported fields
}

func MakeFetcher

func MakeFetcher(logger *zap.Logger, clientGen crd.ClientGeneratorInterface, sharedVolumePath string, sharedSecretPath string,
	sharedConfigPath string, podInfoMountDir string) (*Fetcher, error)

func (*Fetcher) Fetch

func (fetcher *Fetcher) Fetch(ctx context.Context, pkg *fv1.Package, req FunctionFetchRequest) (int, error)

Fetch takes FetchRequest and makes the fetch call It returns the HTTP code and error if any

func (*Fetcher) FetchHandler

func (fetcher *Fetcher) FetchHandler(w http.ResponseWriter, r *http.Request)

func (*Fetcher) FetchSecretsAndCfgMaps

func (fetcher *Fetcher) FetchSecretsAndCfgMaps(ctx context.Context, secrets []fv1.SecretReference, cfgmaps []fv1.ConfigMapReference) (int, error)

FetchSecretsAndCfgMaps fetches secrets and configmaps specified by user It returns the HTTP code and error if any

func (*Fetcher) SpecializeHandler

func (fetcher *Fetcher) SpecializeHandler(w http.ResponseWriter, r *http.Request)

func (*Fetcher) SpecializePod

func (fetcher *Fetcher) SpecializePod(ctx context.Context, fetchReq FunctionFetchRequest, loadReq FunctionLoadRequest) error

func (*Fetcher) UploadHandler

func (fetcher *Fetcher) UploadHandler(w http.ResponseWriter, r *http.Request)

func (*Fetcher) VersionHandler

func (fetcher *Fetcher) VersionHandler(w http.ResponseWriter, r *http.Request)

func (*Fetcher) WsEndHandler added in v1.13.0

func (fetcher *Fetcher) WsEndHandler(w http.ResponseWriter, r *http.Request)

WsEndHandler is used to generate inactive events in Kubernetes

func (*Fetcher) WsStartHandler added in v1.13.0

func (fetcher *Fetcher) WsStartHandler(w http.ResponseWriter, r *http.Request)

WsStartHandler is used to generate websocket events in Kubernetes

type FunctionFetchRequest added in v1.8.0

type FunctionFetchRequest struct {
	FetchType     FetchRequestType         `json:"fetchType"`
	Package       metav1.ObjectMeta        `json:"package"`
	Url           string                   `json:"url"`
	StorageSvcUrl string                   `json:"storagesvcurl"`
	Filename      string                   `json:"filename"`
	Secrets       []fv1.SecretReference    `json:"secretList"`
	ConfigMaps    []fv1.ConfigMapReference `json:"configMapList"`
	KeepArchive   bool                     `json:"keeparchive"`
}

Fission-Environment interface. The following types are not exposed in the Fission API, but rather used by Fission to talk to environments.

type FunctionLoadRequest added in v1.8.0

type FunctionLoadRequest struct {
	// FilePath is an absolute filesystem path to the
	// function. What exactly is stored here is
	// env-specific. Optional.
	FilePath string `json:"filepath"`

	// FunctionName has an environment-specific meaning;
	// usually, it defines a function within a module
	// containing multiple functions. Optional; default is
	// environment-specific.
	FunctionName string `json:"functionName"`

	// URL to expose this function at. Optional; defaults
	// to "/".
	URL string `json:"url"`

	// Metadata
	FunctionMetadata *metav1.ObjectMeta

	EnvVersion int `json:"envVersion"`
}

Fission-Environment interface. The following types are not exposed in the Fission API, but rather used by Fission to talk to environments.

type FunctionSpecializeRequest added in v1.8.0

type FunctionSpecializeRequest struct {
	FetchReq FunctionFetchRequest
	LoadReq  FunctionLoadRequest
}

Fission-Environment interface. The following types are not exposed in the Fission API, but rather used by Fission to talk to environments.

type PodInfo added in v1.13.0

type PodInfo struct {
	Name      string
	Namespace string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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