core

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Overview

package core contains a high level client for interacting with knative primitives used to realise, amongst other things, riff functions. The client typically returns structs for kubernetes resources, as they would have been written "by hand" to be applied by kubectl. It is not the role of the client to deal with printing, formatting or command line parsing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseEnvVar added in v0.1.1

func ParseEnvVar(envVars []string) ([]v1.EnvVar, error)

func ParseEnvVarSource added in v0.1.1

func ParseEnvVarSource(envVarsFrom []string) ([]v1.EnvVar, error)

Types

type BuildFunctionOptions added in v0.1.2

type BuildFunctionOptions struct {
	Namespaced
	Name    string
	Verbose bool
	Wait    bool
}

type Client

type Client interface {
	CreateFunction(options CreateFunctionOptions, log io.Writer) (*serving.Service, error)
	BuildFunction(options BuildFunctionOptions, log io.Writer) error

	CreateSubscription(options CreateSubscriptionOptions) (*eventing.Subscription, error)

	ListChannels(options ListChannelOptions) (*eventing.ChannelList, error)
	CreateChannel(options CreateChannelOptions) (*eventing.Channel, error)
	DeleteChannel(options DeleteChannelOptions) error

	ListServices(options ListServiceOptions) (*serving.ServiceList, error)
	CreateService(options CreateServiceOptions) (*serving.Service, error)
	DeleteService(options DeleteServiceOptions) error
	ServiceStatus(options ServiceStatusOptions) (*v1alpha1.ServiceCondition, error)
	ServiceCoordinates(options ServiceInvokeOptions) (ingressIP string, hostName string, err error)
}

func NewClient

func NewClient(clientConfig clientcmd.ClientConfig, kubeClient kubernetes.Interface, eventing eventing_cs.Interface, serving serving_cs.Interface) Client

type CreateChannelOptions

type CreateChannelOptions struct {
	Namespaced
	Name       string
	Bus        string
	ClusterBus string
	DryRun     bool
}

type CreateFunctionOptions

type CreateFunctionOptions struct {
	CreateServiceOptions

	GitRepo     string
	GitRevision string

	InvokerURL string
	Handler    string
	Artifact   string
}

type CreateServiceOptions

type CreateServiceOptions struct {
	Namespaced
	Name    string
	Image   string
	Env     []string
	EnvFrom []string
	DryRun  bool
	Verbose bool
	Wait    bool
}

type CreateSubscriptionOptions

type CreateSubscriptionOptions struct {
	Namespaced
	Name       string
	Channel    string
	Subscriber string
	ReplyTo    string
	DryRun     bool
}

type DeleteChannelOptions

type DeleteChannelOptions struct {
	Namespaced
	Name string
}

type DeleteServiceOptions

type DeleteServiceOptions struct {
	Namespaced
	Name string
}

type KubectlClient

type KubectlClient interface {
	SystemInstall(options SystemInstallOptions) (bool, error)
	SystemUninstall(options SystemUninstallOptions) (bool, error)
	NamespaceInit(options NamespaceInitOptions) error
}

func NewKubectlClient

func NewKubectlClient(kubeClient kubernetes.Interface) KubectlClient

type ListChannelOptions

type ListChannelOptions struct {
	Namespaced
}

type ListServiceOptions

type ListServiceOptions struct {
	Namespaced
}

type Manifest added in v0.1.2

type Manifest struct {
	ManifestVersion string   `json:"manifestVersion"`
	Istio           []string `json:"istio"`
	Knative         []string `json:"knative"`
	Namespace       []string `json:"namespace"`
}

Manifest defines the location of YAML files for system components.

func NewManifest added in v0.1.2

func NewManifest(path string) (*Manifest, error)

type NamespaceInitOptions

type NamespaceInitOptions struct {
	NamespaceName string
	SecretName    string
	Manifest      string
}

type Namespaced

type Namespaced struct {
	Namespace string
}

type ServiceInvokeOptions

type ServiceInvokeOptions struct {
	Namespaced
	Name string
}

type ServiceStatusOptions

type ServiceStatusOptions struct {
	Namespaced
	Name string
}

type SystemInstallOptions

type SystemInstallOptions struct {
	Manifest string
	NodePort bool
	Force    bool
}

type SystemUninstallOptions added in v0.1.1

type SystemUninstallOptions struct {
	Istio bool
	Force bool
}

type Writer added in v0.1.2

type Writer interface {
	Print(event kail.Event) error
	Fprint(w io.Writer, event kail.Event) error
}

func NewWriter added in v0.1.2

func NewWriter(out io.Writer) Writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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