kubernetes

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() (*k8s.Clientset, error)

Client returns a new Kubernetes client.

func DaprClient added in v0.4.0

func DaprClient() (scheme.Interface, error)

DaprClient returns a new Kubernetes Dapr client

func GetDefaultConfiguration added in v0.4.1

func GetDefaultConfiguration() v1alpha1.Configuration

func Init

func Init() error

Init deploys the Dapr operator

func IsMTLSEnabled added in v0.4.0

func IsMTLSEnabled() (bool, error)

func Logs added in v0.4.0

func Logs(appID, podName, namespace string) error

Logs fetches Dapr sidecar logs from Kubernetes.

func Uninstall

func Uninstall() error

Uninstall removes Dapr

Types

type ComponentsOutput added in v0.4.0

type ComponentsOutput struct {
	Name    string `csv:"Name"`
	Type    string `csv:"Type"`
	Age     string `csv:"AGE"`
	Created string `csv:"CREATED"`
}

ComponentsOutput represent a Dapr component.

func Components added in v0.4.0

func Components() ([]ComponentsOutput, error)

List outputs all Dapr components.

type ConfigurtionsOutput added in v0.4.0

type ConfigurtionsOutput struct {
	Name            string `csv:"Name"`
	TracingEnabled  bool   `csv:"TRACING-ENABLED"`
	MTLSEnabled     bool   `csv:"MTLS-ENABLED"`
	WorkloadCertTTL string `csv:"MTLS-WORKLOAD-TTL"`
	ClockSkew       string `csv:"MTLS-CLOCK-SKEW"`
	Age             string `csv:"AGE"`
	Created         string `csv:"CREATED"`
}

ComponentsOutput represent a Dapr component.

func Configurations added in v0.4.0

func Configurations() ([]ConfigurtionsOutput, error)

List outputs all Dapr configurations.

type ListOutput

type ListOutput struct {
	AppID   string `csv:"APP ID"`
	AppPort string `csv:"APP PORT"`
	Age     string `csv:"AGE"`
	Created string `csv:"CREATED"`
}

ListOutput represents the application ID, application port and creation time.

func List

func List() ([]ListOutput, error)

List outputs all the applications.

type RunConfig

type RunConfig struct {
	AppID         string
	AppPort       int
	HTTPPort      int
	GRPCPort      int
	CodeDirectory string
	Arguments     []string
	Image         string
}

RunConfig represents the application configuration parameters.

type RunOutput

type RunOutput struct {
	Message string
}

RunOutput represents the run output.

func Run

func Run(config *RunConfig) (*RunOutput, error)

Run executes the application based on the run configuration.

Jump to

Keyboard shortcuts

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