mock

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mock provides mock implementations of the lb haproxy manager

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataplaneAPIClient

type DataplaneAPIClient struct {
	DoPostConfig            func(ctx context.Context, config string) error
	DoCheckConfig           func(ctx context.Context, config string) error
	DoAPIIsReady            func(ctx context.Context) bool
	DoWaitForDataPlaneReady func(ctx context.Context, retries int, sleep time.Duration) error
}

DataplaneAPIClient mock client

func (DataplaneAPIClient) APIIsReady

func (c DataplaneAPIClient) APIIsReady(ctx context.Context) bool

func (DataplaneAPIClient) CheckConfig

func (c DataplaneAPIClient) CheckConfig(ctx context.Context, config string) error

func (*DataplaneAPIClient) PostConfig

func (c *DataplaneAPIClient) PostConfig(ctx context.Context, config string) error

func (DataplaneAPIClient) WaitForDataPlaneReady added in v0.0.10

func (c DataplaneAPIClient) WaitForDataPlaneReady(ctx context.Context, retries int, sleep time.Duration) error

type LBAPIClient

type LBAPIClient struct {
	DoGetLoadBalancer func(ctx context.Context, id string) (*lbapi.LoadBalancer, error)
}

LBAPIClient mock client

func (LBAPIClient) GetLoadBalancer

func (c LBAPIClient) GetLoadBalancer(ctx context.Context, id string) (*lbapi.LoadBalancer, error)

type Subscriber

type Subscriber struct {
	DoClose     func() error
	DoSubscribe func(subject string) error
	DoListen    func() error
}

Subscriber mock client

func (*Subscriber) Close

func (s *Subscriber) Close() error

func (*Subscriber) Listen

func (s *Subscriber) Listen() error

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(subject string) error

Jump to

Keyboard shortcuts

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