api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func (*Api) GetBlocks

func (a *Api) GetBlocks(envId string) ([]*types.Block, error)

func (*Api) GetEnvironments

func (a *Api) GetEnvironments() ([]*types.Environment, error)

func (*Api) StartAccess

func (a *Api) StartAccess(blocksToForward []RemoteConfig, envId string)

Used for `kinto access` , `kinto env access`, `kinto svs access` Allows to port-forward/access services depending upon their nature of caller parent

func (*Api) StartTeleport

func (a *Api) StartTeleport(blocksToForward []RemoteConfig, envId string, blockName string)

Used for `kinto teleport` Allows to teleport & port-forward services. Once service is teleported (traffic is redirected) while other services are port-forwarded

func (*Api) TriggerDeploy

func (a *Api) TriggerDeploy(envId string, blockName string) (*types.BlockUpdateResponse, error)

type ApiInterface

type ApiInterface interface {
	GetEnvironments() ([]*types.Environment, error)
	GetBlocks(envId string) ([]*types.Block, error)
	TriggerDeploy(envId string, blockName string) (*types.BlockUpdateResponse, error)
	StartAccess(blocksToForward []RemoteConfig, envId string)
	StartTeleport(blocksToForward []RemoteConfig, envId string, blockName string)
}

func NewApiOrDie

func NewApiOrDie(kintoCoreHost string) ApiInterface

type EnvDetails

type EnvDetails struct {
	EnvName string
	EnvId   string
}

type RemoteConfig

type RemoteConfig struct {
	FromHost string
	FromPort int
	ToHost   string
	ToPort   int
}

Jump to

Keyboard shortcuts

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