Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InterfaceFactoryKey = Key("invV2 external-server-interface key")
InterfaceFactoryKey is the key used to store instance of InterfaceFactory in context.
Functions ¶
func WithServerInterface ¶
WithServerInterface adds the external server interface to context.
Types ¶
type InterfaceFactory ¶
type InterfaceFactory struct {
// contains filtered or unexported fields
}
InterfaceFactory provides a collection of interfaces to external clients.
func GetServerInterface ¶
func GetServerInterface(ctx context.Context) (*InterfaceFactory, error)
GetServerInterface retrieves the ExternalServerInterface from context.
func (*InterfaceFactory) NewUFSInterfaceFactory ¶
func (es *InterfaceFactory) NewUFSInterfaceFactory(ctx context.Context, host string) (UFSClient, error)
NewUFSInterfaceFactory creates a new UFSInterface.
type Key ¶
type Key string
Key is a type for use in adding values to context. It is not recommended to use plain string as key.
type UFSClient ¶
type UFSClient interface { GetDutState(ctx context.Context, in *ufsapi.GetDutStateRequest, opts ...grpc.CallOption) (*lab.DutState, error) GetMachine(ctx context.Context, in *ufsapi.GetMachineRequest, opts ...grpc.CallOption) (*ufspb.Machine, error) GetMachineLSE(ctx context.Context, in *ufsapi.GetMachineLSERequest, opts ...grpc.CallOption) (*ufspb.MachineLSE, error) ListMachines(ctx context.Context, in *ufsapi.ListMachinesRequest, opts ...grpc.CallOption) (*ufsapi.ListMachinesResponse, error) ListMachineLSEs(ctx context.Context, in *ufsapi.ListMachineLSEsRequest, opts ...grpc.CallOption) (*ufsapi.ListMachineLSEsResponse, error) UpdateDutState(ctx context.Context, in *ufsapi.UpdateDutStateRequest, opts ...grpc.CallOption) (*lab.DutState, error) ListDutStates(ctx context.Context, in *ufsapi.ListDutStatesRequest, opts ...grpc.CallOption) (*ufsapi.ListDutStatesResponse, error) CreateMachineLSE(context.Context, *ufsapi.CreateMachineLSERequest, ...grpc.CallOption) (*ufspb.MachineLSE, error) CreateAsset(context.Context, *ufsapi.CreateAssetRequest, ...grpc.CallOption) (*ufspb.Asset, error) RackRegistration(context.Context, *ufsapi.RackRegistrationRequest, ...grpc.CallOption) (*ufspb.Rack, error) GetAsset(context.Context, *ufsapi.GetAssetRequest, ...grpc.CallOption) (*ufspb.Asset, error) GetRack(context.Context, *ufsapi.GetRackRequest, ...grpc.CallOption) (*ufspb.Rack, error) UpdateMachineLSE(context.Context, *ufsapi.UpdateMachineLSERequest, ...grpc.CallOption) (*ufspb.MachineLSE, error) DeleteMachineLSE(context.Context, *ufsapi.DeleteMachineLSERequest, ...grpc.CallOption) (*emptypb.Empty, error) UpdateAsset(context.Context, *ufsapi.UpdateAssetRequest, ...grpc.CallOption) (*ufspb.Asset, error) }
UFSClient refers to the fake UFS client
Click to show internal directories.
Click to hide internal directories.