broker

package
v0.0.0-...-9dbba9d Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

Types

type BrokerOAuthConfig

type BrokerOAuthConfig struct {
	ClientID     string
	ClientSecret string
	Scope        string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, config Config, globalAccountID, instanceID, subAccountID, userID string, oAuthCfg BrokerOAuthConfig, log logrus.FieldLogger) *Client

func (*Client) AwaitOperationSucceeded

func (c *Client) AwaitOperationSucceeded(operationID string, timeout time.Duration) error

func (*Client) ClusterName

func (c *Client) ClusterName() string

func (*Client) DeprovisionRuntime

func (c *Client) DeprovisionRuntime() (string, error)

func (*Client) FetchDashboardURL

func (c *Client) FetchDashboardURL() (string, error)

func (*Client) GlobalAccountID

func (c *Client) GlobalAccountID() string

func (*Client) InstanceID

func (c *Client) InstanceID() string

func (*Client) ProvisionRuntime

func (c *Client) ProvisionRuntime(kymaVersion string) (string, error)

ProvisionRuntime requests Runtime provisioning in KEB kymaVersion is optional, if it is empty, the default KEB version will be used

func (*Client) SetInstanceID

func (c *Client) SetInstanceID(id string)

func (*Client) SubAccountID

func (c *Client) SubAccountID() string

func (*Client) SuspendRuntime

func (c *Client) SuspendRuntime() error

func (*Client) UnsuspendRuntime

func (c *Client) UnsuspendRuntime() error

func (*Client) UserID

func (c *Client) UserID() string

type Config

type Config struct {
	ClientName     string
	ClientID       string
	ClientSecret   string
	Scope          string `envconfig:"default=broker:write"`
	TokenURL       string
	URL            string
	PlanID         string
	Region         string
	PlatformRegion string `envconfig:"optional"`
}

type OrchestrationResponse

type OrchestrationResponse struct {
	OrchestrationID string
	State           string
}

type Runtime

type Runtime struct {
	RuntimeID         string `json:"runtimeId"`
	ServiceInstanceID string `json:"serviceInstanceId"`
}

type RuntimeTarget

type RuntimeTarget struct {
	RuntimeID string `json:"runtimeId,omitempty"`
}

type Target

type Target struct {
	Include []RuntimeTarget `json:"include"`
}

type UpgradeClient

type UpgradeClient struct {
	URL string
	// contains filtered or unexported fields
}

func NewUpgradeClient

func NewUpgradeClient(ctx context.Context, oAuthConfig BrokerOAuthConfig, config Config, log logrus.FieldLogger) *UpgradeClient

func (*UpgradeClient) AwaitOperationFinished

func (c *UpgradeClient) AwaitOperationFinished(orchestrationID string, timeout time.Duration) error

func (*UpgradeClient) FetchRuntimeID

func (c *UpgradeClient) FetchRuntimeID(instanceID string) (string, error)

func (*UpgradeClient) UpgradeRuntime

func (c *UpgradeClient) UpgradeRuntime(runtimeID string) (string, error)

type UpgradeRuntimeRequest

type UpgradeRuntimeRequest struct {
	Targets Target `json:"targets"`
}

type UpgradeRuntimeResponse

type UpgradeRuntimeResponse struct {
	OrchestrationID string `json:"orchestration_id"`
}

Jump to

Keyboard shortcuts

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