sidecar

package
v0.0.0-...-0181b2f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	// contains filtered or unexported fields
}

*

  • This file contains all APIs used to interact with omnistrate platform via proxy companion process - sidecar.

func NewClient

func NewClient(ctx context.Context) *Client

func (*Client) QueryBackendInstanceStatus

func (c *Client) QueryBackendInstanceStatus(port string) (*http.Response, error)

*

  • This API is used to get backend instance status via mapped proxy port.
  • In Omnistrate platform, when creating serverless backend instance, proxy ports will be assigned to the backend instance based on the serverless configuration.

func (*Client) StartInstance

func (c *Client) StartInstance(instanceId string) (*http.Response, error)

*

  • This API is used to start backend instance via instance id, proxy will need to obtain instance id first before calling this API

func (*Client) StopInstance

func (c *Client) StopInstance(instanceId string) (*http.Response, error)

*

  • This API is used to stop backend instance via instance id, proxy will need to obtain instance id first before calling this API.
  • Note that you may not need this API if you enable auto pause in serverless configuration.

type InstanceStatus

type InstanceStatus struct {
	InstanceID            string             `json:"instanceId"`
	ServiceComponents     []ServiceComponent `json:"serviceComponents"`
	Status                Status             `json:"status"`
	LastObservedTimestamp strfmt.DateTime    `json:"lastObservedTimestamp"`
}

type NodeEndpoint

type NodeEndpoint struct {
	NodeName         string `json:"nodeName"`
	Endpoint         string `json:"endpoint"`
	AvailabilityZone string `json:"availabilityZone"`
}

type ServiceComponent

type ServiceComponent struct {
	ID             string         `json:"id"`
	Alias          string         `json:"alias"`
	NodesEndpoints []NodeEndpoint `json:"nodesEndpoints"`
}

type Status

type Status string
const (
	ACTIVE   Status = "ACTIVE"
	STARTING Status = "STARTING"
	PAUSED   Status = "PAUSED"
	FAILED   Status = "FAILED"
	UNKNOWN  Status = "UNKNOWN"
)

Jump to

Keyboard shortcuts

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