common

package
v0.0.0-...-5ec74ad Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2019 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Copyright 2019 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) bool

func MergeFunctions

func MergeFunctions(one, two *Function)

func MergeMaps

func MergeMaps(one, two map[string]string)

func MergeRawJson

func MergeRawJson(one *json.RawMessage, two json.RawMessage)

func MergeStrings

func MergeStrings(one *string, two string)

Types

type Function

type Function struct {
	Kind     string `json:"kind"`
	Metadata FunctionMeta
	Spec     FunctionSpec
	Status   json.RawMessage `json:"status,omitempty"`
}

type FunctionMeta

type FunctionMeta struct {
	Project     string `json:"project,omitempty"`
	Name        string `json:"name"`
	Tag         string `json:"tag,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
	Labels      map[string]string
	Annotations map[string]string
}

type FunctionSpec

type FunctionSpec struct {
	Command     string          `json:"command,omitempty"`
	Image       string          `json:"image,omitempty"`
	Mode        string          `json:"mode,omitempty"`
	Args        []string        `json:"args,omitempty"`
	Description string          `json:"description,omitempty"`
	Build       ImageBuilder    `json:"build,omitempty"`
	EnrtyPoints json.RawMessage `json:"entry_points,omitempty"`

	Env             json.RawMessage `json:"env,omitempty"`
	Volumes         json.RawMessage `json:"volumes,omitempty"`
	VolumeMounts    json.RawMessage `json:"volume_mounts,omitempty"`
	Resources       json.RawMessage `json:"resources,omitempty"`
	Replicas        int             `json:"replicas,omitempty"`
	ImagePullPolicy string          `json:"image_pull_policy,omitempty"`
	ServiceAccount  string          `json:"service_account,omitempty"`
}

type ImageBuilder

type ImageBuilder struct {
	BaseImage          string   `json:"base_image,omitempty"`
	FunctionSourceCode []byte   `json:"functionSourceCode,omitempty"`
	Commands           []string `json:"commands,omitempty"`
	Registry           string   `json:"registry,omitempty"`
	Secret             string   `json:"secret,omitempty"`
	Source             string   `json:"source,omitempty"`
	Image              string   `json:"image,omitempty"`
}

Jump to

Keyboard shortcuts

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