inject

package
v0.41.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inject provides an mock cloud connection service that can be used for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudConnectionService

type CloudConnectionService struct {
	resource.Named
	resource.AlwaysRebuild
	Conn                 rpc.ClientConn
	AcquireConnectionErr error
}

CloudConnectionService is an implementation of the cloud.ConnectionService interface used for testing.

func (*CloudConnectionService) AcquireConnection

func (cloudConnService *CloudConnectionService) AcquireConnection(ctx context.Context) (string, rpc.ClientConn, error)

AcquireConnection returns a connection to the rpc server stored in the cloud connection service object.

func (*CloudConnectionService) AcquireConnectionAPIKey added in v0.12.0

func (cloudConnService *CloudConnectionService) AcquireConnectionAPIKey(ctx context.Context,
	apiKey, apiKeyID string,
) (string, rpc.ClientConn, error)

AcquireConnectionAPIKey returns a connection to the rpc server stored in the cloud connection service object.

func (*CloudConnectionService) Close

func (cloudConnService *CloudConnectionService) Close(ctx context.Context) error

Close is used by the CloudConnectionService to complete the cloud.ConnectionService interface.

Jump to

Keyboard shortcuts

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