fetcher

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveUploadRequest

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

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

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 {
	// contains filtered or unexported fields
}

func MakeFetcher

func MakeFetcher(logger *zap.Logger, sharedVolumePath string, sharedSecretPath string, sharedConfigPath 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(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)

type FunctionFetchRequest

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

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"`

	// Metatdata
	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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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