mocktpu

package
v0.0.0-...-f40b5dd Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a MockService.

func ProtoClone

func ProtoClone[T proto.Message](obj T) T

Types

type MockService

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

MockService represents a mocked tpu service.

func (*MockService) ConfigureVisitor

func (s *MockService) ConfigureVisitor(url string, replacements mockgcpregistry.NormalizingVisitor)

func (*MockService) ExpectedHosts

func (s *MockService) ExpectedHosts() []string

func (*MockService) NewHTTPMux

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

func (*MockService) Previsit

func (s *MockService) Previsit(event mockgcpregistry.Event, replacements mockgcpregistry.NormalizingVisitor)

func (*MockService) Register

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

type TpuServer

type TpuServer struct {
	*MockService
	pb.UnimplementedTpuServer
}

func (*TpuServer) CreateNode

func (*TpuServer) DeleteNode

func (*TpuServer) GetNode

func (s *TpuServer) GetNode(ctx context.Context, req *pb.GetNodeRequest) (*pb.Node, error)

func (*TpuServer) ListNodes

func (s *TpuServer) ListNodes(ctx context.Context, req *pb.ListNodesRequest) (*pb.ListNodesResponse, error)

func (*TpuServer) UpdateNode

Jump to

Keyboard shortcuts

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