yapi

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudContext

type CloudContext struct {
	RegionID string
	FolderID string

	OperationWaiter OperationWaiter
}

type ComputeService

type ComputeService struct {
	InstanceSvc compute.InstanceServiceClient
	ZoneSvc     compute.ZoneServiceClient
	// contains filtered or unexported fields
}

func NewComputeService

func NewComputeService(iSvc compute.InstanceServiceClient, zSvc compute.ZoneServiceClient,
	cloudCtx *CloudContext) *ComputeService

func (*ComputeService) FindInstanceByName

func (cs *ComputeService) FindInstanceByName(ctx context.Context, instanceName string) (*compute.Instance, error)

type LoadBalancerService

type LoadBalancerService struct {
	LbSvc loadbalancer.NetworkLoadBalancerServiceClient
	TgSvc loadbalancer.TargetGroupServiceClient
	// contains filtered or unexported fields
}

func NewLoadBalancerService

func NewLoadBalancerService(lbSvc loadbalancer.NetworkLoadBalancerServiceClient, tgSvc loadbalancer.TargetGroupServiceClient,
	cloudCtx *CloudContext) *LoadBalancerService

func (*LoadBalancerService) CreateOrUpdateLB

func (ySvc *LoadBalancerService) CreateOrUpdateLB(ctx context.Context, name string, listenerSpec []*loadbalancer.ListenerSpec, attachedTGs []*loadbalancer.AttachedTargetGroup) (string, error)

func (*LoadBalancerService) CreateOrUpdateTG

func (ySvc *LoadBalancerService) CreateOrUpdateTG(ctx context.Context, tgName string, targets []*loadbalancer.Target) (string, error)

func (*LoadBalancerService) GetLbByName

func (ySvc *LoadBalancerService) GetLbByName(ctx context.Context, name string) (*loadbalancer.NetworkLoadBalancer, error)

func (*LoadBalancerService) GetTGsByClusterName

func (ySvc *LoadBalancerService) GetTGsByClusterName(ctx context.Context, clusterName string) (ret []*loadbalancer.TargetGroup, err error)

func (*LoadBalancerService) GetTgByName

func (ySvc *LoadBalancerService) GetTgByName(ctx context.Context, name string) (*loadbalancer.TargetGroup, error)

func (*LoadBalancerService) RemoveLBByName

func (ySvc *LoadBalancerService) RemoveLBByName(ctx context.Context, name string) error

func (*LoadBalancerService) RemoveTGByID

func (ySvc *LoadBalancerService) RemoveTGByID(ctx context.Context, tgId string) error

type OperationWaiter

type OperationWaiter func(ctx context.Context, origFunc func() (*operation.Operation, error)) (proto.Message, *ycsdkoperation.Operation, error)

type VPCService

type VPCService struct {
	NetworkSvc    vpc.NetworkServiceClient
	SubnetSvc     vpc.SubnetServiceClient
	RouteTableSvc vpc.RouteTableServiceClient
	// contains filtered or unexported fields
}

func NewVPCService

func NewVPCService(nSvc vpc.NetworkServiceClient, sSvc vpc.SubnetServiceClient, rtSvc vpc.RouteTableServiceClient,
	cloudCtx *CloudContext) *VPCService

type YandexCloudAPI

type YandexCloudAPI struct {
	VPCSvc     *VPCService
	ComputeSvc *ComputeService
	LbSvc      *LoadBalancerService

	OperationWaiter OperationWaiter
	// contains filtered or unexported fields
}

func NewYandexCloudAPI

func NewYandexCloudAPI(creds ycsdk.Credentials, regionID, folderID string) (*YandexCloudAPI, error)

Jump to

Keyboard shortcuts

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