deploy

package
v0.0.0-...-7d1f045 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendGroupDeployer

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

func NewBackendGroupDeployer

func NewBackendGroupDeployer(repo BackendGroupRepo) *BackendGroupDeployer

func (*BackendGroupDeployer) Deploy

func (d *BackendGroupDeployer) Deploy(ctx context.Context, expected *apploadbalancer.BackendGroup) (*apploadbalancer.BackendGroup, error)

func (*BackendGroupDeployer) Undeploy

func (d *BackendGroupDeployer) Undeploy(ctx context.Context, name string) (*apploadbalancer.BackendGroup, error)

type BackendGroupRepo

type BackendGroupRepo interface {
	FindBackendGroup(ctx context.Context, name string) (*apploadbalancer.BackendGroup, error)
	CreateBackendGroup(ctx context.Context, group *apploadbalancer.BackendGroup) (*operation.Operation, error)
	UpdateBackendGroup(ctx context.Context, group *apploadbalancer.BackendGroup) (*operation.Operation, error)
	DeleteBackendGroup(context.Context, *apploadbalancer.BackendGroup) (*operation.Operation, error)
	ListBackendGroupOperations(ctx context.Context, group *apploadbalancer.BackendGroup) ([]*operation.Operation, error)
}

type IngressGroupDeployManager

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

func NewIngressGroupDeployManager

func NewIngressGroupDeployManager(repo ResourceFinder) *IngressGroupDeployManager

func (*IngressGroupDeployManager) Deploy

func (*IngressGroupDeployManager) UndeployOldBG

func (m *IngressGroupDeployManager) UndeployOldBG(ctx context.Context, tag string) error

type ReconcileEngine

type ReconcileEngine interface {
	ReconcileHTTPRouter(context.Context, *apploadbalancer.HttpRouter) (*ReconciledHTTPRouter, error)
	ReconcileTLSRouter(context.Context, *apploadbalancer.HttpRouter) (*ReconciledHTTPRouter, error)
	ReconcileBalancer(context.Context, *apploadbalancer.LoadBalancer) (*ReconciledBalancer, error)
}

type ReconciledBalancer

type ReconciledBalancer struct {
	Active  *apploadbalancer.LoadBalancer
	Garbage *apploadbalancer.LoadBalancer
}

TODO: data structures below should be in some other package deps defined as interfaces use these data structures and this results in an import cycle in tests after direct mock generation (i.e. mockgen -destination=./mocks/ingressgroup.go -package=mocks . ReconcileEngine,ResourceFinder), which is a sign of incorrect type placement

type ReconciledHTTPRouter

type ReconciledHTTPRouter struct {
	Active  *apploadbalancer.HttpRouter
	Garbage *apploadbalancer.HttpRouter
}

TODO: data structures below should be in some other package deps defined as interfaces use these data structures and this results in an import cycle in tests after direct mock generation (i.e. mockgen -destination=./mocks/ingressgroup.go -package=mocks . ReconcileEngine,ResourceFinder), which is a sign of incorrect type placement

type ResourceFinder

type ResourceFinder interface {
	FindAllResources(ctx context.Context, tag string) (*yc.BalancerResources, error)
	DeleteAllResources(background context.Context, b *yc.BalancerResources) error

	// FindBackendGroups and DeleteBackendGroups are needed to remove backend groups from old schema
	// TODO: remove when majority of users use newer version of controller
	FindBackendGroups(ctx context.Context, tag string) ([]*apploadbalancer.BackendGroup, error)
	DeleteBackendGroups(ctx context.Context, groups []*apploadbalancer.BackendGroup) error
}

type TargetGroupDeployer

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

func NewServiceDeployer

func NewServiceDeployer(repo TargetGroupRepo) *TargetGroupDeployer

func (*TargetGroupDeployer) Deploy

func (d *TargetGroupDeployer) Deploy(ctx context.Context, expected *apploadbalancer.TargetGroup) (*apploadbalancer.TargetGroup, error)

func (*TargetGroupDeployer) Undeploy

func (d *TargetGroupDeployer) Undeploy(ctx context.Context, name string) (*apploadbalancer.TargetGroup, error)

type TargetGroupRepo

type TargetGroupRepo interface {
	FindTargetGroup(context.Context, string) (*apploadbalancer.TargetGroup, error)
	CreateTargetGroup(context.Context, *apploadbalancer.TargetGroup) (*operation.Operation, error)
	UpdateTargetGroup(context.Context, *apploadbalancer.TargetGroup) (*operation.Operation, error)
	DeleteTargetGroup(context.Context, *apploadbalancer.TargetGroup) error
	ListTargetGroupIncompleteOperations(context.Context, *apploadbalancer.TargetGroup) ([]*operation.Operation, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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