sdk

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDK

type SDK struct {
	GatewayURL  *url.URL
	Client      *http.Client
	Credentials *auth.BasicAuthCredentials
}

SDK is an SDK for managing OpenFaaS functions

func NewSDK

func NewSDK(gatewayURL *url.URL, credentials *auth.BasicAuthCredentials, client *http.Client) *SDK

NewSDK creates an SDK for managing OpenFaaS

func (*SDK) GetFunctions

func (s *SDK) GetFunctions(namespace string) ([]types.FunctionStatus, error)

GetFunctions lists all functions

func (*SDK) GetNamespaces

func (s *SDK) GetNamespaces() ([]string, error)

GetNamespaces get openfaas namespaces

func (*SDK) ScaleFunction

func (s *SDK) ScaleFunction(ctx context.Context, functionName, namespace string, replicas uint64) error

ScaleFunction scales a function to a number of replicas

Jump to

Keyboard shortcuts

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