Documentation ¶
Overview ¶
Package mock provides mock implementations of the lb haproxy manager
Index ¶
- type DataplaneAPIClient
- func (c DataplaneAPIClient) APIIsReady(ctx context.Context) bool
- func (c DataplaneAPIClient) CheckConfig(ctx context.Context, config string) error
- func (c *DataplaneAPIClient) PostConfig(ctx context.Context, config string) error
- func (c DataplaneAPIClient) WaitForDataPlaneReady(ctx context.Context, retries int, sleep time.Duration) error
- type LBAPIClient
- type Subscriber
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
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
Click to show internal directories.
Click to hide internal directories.