Documentation
¶
Index ¶
- func New(env *common.MockEnvironment, storage storage.Storage) mockgcpregistry.MockService
- func ProtoClone[T proto.Message](obj T) T
- type MockService
- func (s *MockService) ConfigureVisitor(url string, replacements mockgcpregistry.NormalizingVisitor)
- func (s *MockService) ExpectedHosts() []string
- func (s *MockService) NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error)
- func (s *MockService) Previsit(event mockgcpregistry.Event, replacements mockgcpregistry.NormalizingVisitor)
- func (s *MockService) Register(grpcServer *grpc.Server)
- type TpuServer
- func (s *TpuServer) CreateNode(ctx context.Context, req *pb.CreateNodeRequest) (*longrunningpb.Operation, error)
- func (s *TpuServer) DeleteNode(ctx context.Context, req *pb.DeleteNodeRequest) (*longrunningpb.Operation, error)
- func (s *TpuServer) GetNode(ctx context.Context, req *pb.GetNodeRequest) (*pb.Node, error)
- func (s *TpuServer) ListNodes(ctx context.Context, req *pb.ListNodesRequest) (*pb.ListNodesResponse, error)
- func (s *TpuServer) UpdateNode(ctx context.Context, req *pb.UpdateNodeRequest) (*longrunningpb.Operation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(env *common.MockEnvironment, storage storage.Storage) mockgcpregistry.MockService
New creates a MockService.
func ProtoClone ¶
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 (s *TpuServer) CreateNode(ctx context.Context, req *pb.CreateNodeRequest) (*longrunningpb.Operation, error)
func (*TpuServer) DeleteNode ¶
func (s *TpuServer) DeleteNode(ctx context.Context, req *pb.DeleteNodeRequest) (*longrunningpb.Operation, error)
func (*TpuServer) ListNodes ¶
func (s *TpuServer) ListNodes(ctx context.Context, req *pb.ListNodesRequest) (*pb.ListNodesResponse, error)
func (*TpuServer) UpdateNode ¶
func (s *TpuServer) UpdateNode(ctx context.Context, req *pb.UpdateNodeRequest) (*longrunningpb.Operation, error)
Click to show internal directories.
Click to hide internal directories.