mockcontainer

package
v0.0.0-...-d51fc3a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PtrTo

func PtrTo[T any](t T) *T

func ValueOf

func ValueOf[T any](t *T) T

Types

type ClusterManagerV1

type ClusterManagerV1 struct {
	*MockService
	pb.UnimplementedClusterManagerServer
}

func (*ClusterManagerV1) CreateCluster

func (s *ClusterManagerV1) CreateCluster(ctx context.Context, req *pb.CreateClusterRequest) (*pb.Operation, error)

func (*ClusterManagerV1) CreateNodePool

func (s *ClusterManagerV1) CreateNodePool(ctx context.Context, req *pb.CreateNodePoolRequest) (*pb.Operation, error)

func (*ClusterManagerV1) DeleteCluster

func (s *ClusterManagerV1) DeleteCluster(ctx context.Context, req *pb.DeleteClusterRequest) (*pb.Operation, error)

func (*ClusterManagerV1) DeleteNodePool

func (s *ClusterManagerV1) DeleteNodePool(ctx context.Context, req *pb.DeleteNodePoolRequest) (*pb.Operation, error)

func (*ClusterManagerV1) GetCluster

func (s *ClusterManagerV1) GetCluster(ctx context.Context, req *pb.GetClusterRequest) (*pb.Cluster, error)

func (*ClusterManagerV1) GetNodePool

func (s *ClusterManagerV1) GetNodePool(ctx context.Context, req *pb.GetNodePoolRequest) (*pb.NodePool, error)

func (*ClusterManagerV1) GetOperation

func (s *ClusterManagerV1) GetOperation(ctx context.Context, req *pb.GetOperationRequest) (*pb.Operation, error)

func (*ClusterManagerV1) UpdateCluster

func (s *ClusterManagerV1) UpdateCluster(ctx context.Context, req *pb.UpdateClusterRequest) (*pb.Operation, error)

func (*ClusterManagerV1) UpdateNodePool

func (s *ClusterManagerV1) UpdateNodePool(ctx context.Context, req *pb.UpdateNodePoolRequest) (*pb.Operation, error)

type MockService

type MockService struct {
	*common.MockEnvironment
	// contains filtered or unexported fields
}

MockService represents a mocked container service.

func New

func New(env *common.MockEnvironment, storage storage.Storage) *MockService

New creates a MockService.

func (*MockService) ExpectedHost

func (s *MockService) ExpectedHost() string

func (*MockService) NewHTTPMux

func (s *MockService) NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error)

func (*MockService) Register

func (s *MockService) Register(grpcServer *grpc.Server)

Jump to

Keyboard shortcuts

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