containerinstances

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListContainerGroups(ctx context.Context, resourceGroup string) ([]*armcontainerinstance.ContainerGroup, error)
	GetContainerGroup(ctx context.Context, resourceGroup, containerGroup string) (armcontainerinstance.ContainerGroupsClientGetResponse, error)
	GetContainerLogs(ctx context.Context, resourceGroup, containerGroup, container string, tail *int32, timestamps *bool) (*string, error)
	RestartContainerGroup(ctx context.Context, resourceGroup, containerGroup string) error
}

Client is the interface for a client to interact with the Azure container instances.

func New

func New(subscriptionID string, credentials *azidentity.ClientSecretCredential) (Client, error)

New returns a new client to interact with the container instances API.

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t NewMockClientT) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockClient) GetContainerGroup

func (_m *MockClient) GetContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) (armcontainerinstance.ContainerGroupsClientGetResponse, error)

GetContainerGroup provides a mock function with given fields: ctx, resourceGroup, containerGroup

func (*MockClient) GetContainerLogs

func (_m *MockClient) GetContainerLogs(ctx context.Context, resourceGroup string, containerGroup string, container string, tail *int32, timestamps *bool) (*string, error)

GetContainerLogs provides a mock function with given fields: ctx, resourceGroup, containerGroup, container, tail, timestamps

func (*MockClient) ListContainerGroups

func (_m *MockClient) ListContainerGroups(ctx context.Context, resourceGroup string) ([]*armcontainerinstance.ContainerGroup, error)

ListContainerGroups provides a mock function with given fields: ctx, resourceGroup

func (*MockClient) RestartContainerGroup

func (_m *MockClient) RestartContainerGroup(ctx context.Context, resourceGroup string, containerGroup string) error

RestartContainerGroup provides a mock function with given fields: ctx, resourceGroup, containerGroup

type NewMockClientT

type NewMockClientT interface {
	mock.TestingT
	Cleanup(func())
}

Jump to

Keyboard shortcuts

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