Documentation ¶
Index ¶
- Variables
- func RegisterHardwareServiceServer(s grpc.ServiceRegistrar, srv HardwareServiceServer)
- type DeleteRequest
- type Empty
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetId() string
- func (x *GetRequest) GetIp() string
- func (x *GetRequest) GetMac() string
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- type Hardware
- func (*Hardware) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware) GetId() string
- func (x *Hardware) GetMetadata() string
- func (x *Hardware) GetNetwork() *Hardware_Network
- func (x *Hardware) GetVersion() int64
- func (*Hardware) ProtoMessage()
- func (x *Hardware) ProtoReflect() protoreflect.Message
- func (x *Hardware) Reset()
- func (x *Hardware) String() string
- type HardwareServiceClient
- type HardwareServiceClientMock
- func (mock *HardwareServiceClientMock) All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error)
- func (mock *HardwareServiceClientMock) AllCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
- func (mock *HardwareServiceClientMock) ByIDCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
- func (mock *HardwareServiceClientMock) ByIPCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
- func (mock *HardwareServiceClientMock) ByMACCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error)
- func (mock *HardwareServiceClientMock) DeleteCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error)
- func (mock *HardwareServiceClientMock) DeprecatedWatchCalls() []struct{ ... }
- func (mock *HardwareServiceClientMock) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error)
- func (mock *HardwareServiceClientMock) PushCalls() []struct{ ... }
- type HardwareServiceServer
- type HardwareService_AllClient
- type HardwareService_AllClientMock
- func (mock *HardwareService_AllClientMock) CloseSend() error
- func (mock *HardwareService_AllClientMock) CloseSendCalls() []struct{}
- func (mock *HardwareService_AllClientMock) Context() context.Context
- func (mock *HardwareService_AllClientMock) ContextCalls() []struct{}
- func (mock *HardwareService_AllClientMock) Header() (metadata.MD, error)
- func (mock *HardwareService_AllClientMock) HeaderCalls() []struct{}
- func (mock *HardwareService_AllClientMock) Recv() (*Hardware, error)
- func (mock *HardwareService_AllClientMock) RecvCalls() []struct{}
- func (mock *HardwareService_AllClientMock) RecvMsg(m interface{}) error
- func (mock *HardwareService_AllClientMock) RecvMsgCalls() []struct{ ... }
- func (mock *HardwareService_AllClientMock) SendMsg(m interface{}) error
- func (mock *HardwareService_AllClientMock) SendMsgCalls() []struct{ ... }
- func (mock *HardwareService_AllClientMock) Trailer() metadata.MD
- func (mock *HardwareService_AllClientMock) TrailerCalls() []struct{}
- type HardwareService_AllServer
- type HardwareService_DeprecatedWatchClient
- type HardwareService_DeprecatedWatchServer
- type Hardware_DHCP
- func (*Hardware_DHCP) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_DHCP) GetArch() string
- func (x *Hardware_DHCP) GetHostname() string
- func (x *Hardware_DHCP) GetIfaceName() string
- func (x *Hardware_DHCP) GetIp() *Hardware_DHCP_IP
- func (x *Hardware_DHCP) GetLeaseTime() int64
- func (x *Hardware_DHCP) GetMac() string
- func (x *Hardware_DHCP) GetNameServers() []string
- func (x *Hardware_DHCP) GetTimeServers() []string
- func (x *Hardware_DHCP) GetUefi() bool
- func (*Hardware_DHCP) ProtoMessage()
- func (x *Hardware_DHCP) ProtoReflect() protoreflect.Message
- func (x *Hardware_DHCP) Reset()
- func (x *Hardware_DHCP) String() string
- type Hardware_DHCP_IP
- func (*Hardware_DHCP_IP) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_DHCP_IP) GetAddress() string
- func (x *Hardware_DHCP_IP) GetFamily() int64
- func (x *Hardware_DHCP_IP) GetGateway() string
- func (x *Hardware_DHCP_IP) GetNetmask() string
- func (*Hardware_DHCP_IP) ProtoMessage()
- func (x *Hardware_DHCP_IP) ProtoReflect() protoreflect.Message
- func (x *Hardware_DHCP_IP) Reset()
- func (x *Hardware_DHCP_IP) String() string
- type Hardware_Netboot
- func (*Hardware_Netboot) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_Netboot) GetAllowPxe() bool
- func (x *Hardware_Netboot) GetAllowWorkflow() bool
- func (x *Hardware_Netboot) GetIpxe() *Hardware_Netboot_IPXE
- func (x *Hardware_Netboot) GetOsie() *Hardware_Netboot_Osie
- func (*Hardware_Netboot) ProtoMessage()
- func (x *Hardware_Netboot) ProtoReflect() protoreflect.Message
- func (x *Hardware_Netboot) Reset()
- func (x *Hardware_Netboot) String() string
- type Hardware_Netboot_IPXE
- func (*Hardware_Netboot_IPXE) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_Netboot_IPXE) GetContents() string
- func (x *Hardware_Netboot_IPXE) GetUrl() string
- func (*Hardware_Netboot_IPXE) ProtoMessage()
- func (x *Hardware_Netboot_IPXE) ProtoReflect() protoreflect.Message
- func (x *Hardware_Netboot_IPXE) Reset()
- func (x *Hardware_Netboot_IPXE) String() string
- type Hardware_Netboot_Osie
- func (*Hardware_Netboot_Osie) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_Netboot_Osie) GetBaseUrl() string
- func (x *Hardware_Netboot_Osie) GetInitrd() string
- func (x *Hardware_Netboot_Osie) GetKernel() string
- func (*Hardware_Netboot_Osie) ProtoMessage()
- func (x *Hardware_Netboot_Osie) ProtoReflect() protoreflect.Message
- func (x *Hardware_Netboot_Osie) Reset()
- func (x *Hardware_Netboot_Osie) String() string
- type Hardware_Network
- func (*Hardware_Network) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_Network) GetInterfaces() []*Hardware_Network_Interface
- func (*Hardware_Network) ProtoMessage()
- func (x *Hardware_Network) ProtoReflect() protoreflect.Message
- func (x *Hardware_Network) Reset()
- func (x *Hardware_Network) String() string
- type Hardware_Network_Interface
- func (*Hardware_Network_Interface) Descriptor() ([]byte, []int)deprecated
- func (x *Hardware_Network_Interface) GetDhcp() *Hardware_DHCP
- func (x *Hardware_Network_Interface) GetNetboot() *Hardware_Netboot
- func (*Hardware_Network_Interface) ProtoMessage()
- func (x *Hardware_Network_Interface) ProtoReflect() protoreflect.Message
- func (x *Hardware_Network_Interface) Reset()
- func (x *Hardware_Network_Interface) String() string
- type PushRequest
- type UnimplementedHardwareServiceServer
- func (UnimplementedHardwareServiceServer) All(*Empty, HardwareService_AllServer) error
- func (UnimplementedHardwareServiceServer) ByID(context.Context, *GetRequest) (*Hardware, error)
- func (UnimplementedHardwareServiceServer) ByIP(context.Context, *GetRequest) (*Hardware, error)
- func (UnimplementedHardwareServiceServer) ByMAC(context.Context, *GetRequest) (*Hardware, error)
- func (UnimplementedHardwareServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
- func (UnimplementedHardwareServiceServer) DeprecatedWatch(*GetRequest, HardwareService_DeprecatedWatchServer) error
- func (UnimplementedHardwareServiceServer) Push(context.Context, *PushRequest) (*Empty, error)
- type UnsafeHardwareServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_protos_hardware_hardware_proto protoreflect.FileDescriptor
var HardwareService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "github.com.tinkerbell.tink.protos.hardware.HardwareService", HandlerType: (*HardwareServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Push", Handler: _HardwareService_Push_Handler, }, { MethodName: "ByMAC", Handler: _HardwareService_ByMAC_Handler, }, { MethodName: "ByIP", Handler: _HardwareService_ByIP_Handler, }, { MethodName: "ByID", Handler: _HardwareService_ByID_Handler, }, { MethodName: "Delete", Handler: _HardwareService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "All", Handler: _HardwareService_All_Handler, ServerStreams: true, }, { StreamName: "DeprecatedWatch", Handler: _HardwareService_DeprecatedWatch_Handler, ServerStreams: true, }, }, Metadata: "protos/hardware/hardware.proto", }
HardwareService_ServiceDesc is the grpc.ServiceDesc for HardwareService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHardwareServiceServer ¶
func RegisterHardwareServiceServer(s grpc.ServiceRegistrar, srv HardwareServiceServer)
Types ¶
type DeleteRequest ¶
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
DeleteRequest gets used when you want to delete an hardware by its identifier. Usually it is a UUID.
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶ added in v0.2.0
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Empty represents an empty response
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v0.2.0
func (x *Empty) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
GetRequest is the request used by the Get various get methods exposed by the hardware service.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) GetIp ¶
func (x *GetRequest) GetIp() string
func (*GetRequest) GetMac ¶
func (x *GetRequest) GetMac() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶ added in v0.2.0
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type Hardware ¶
type Hardware struct { // // Describe network layout for your hardware Network *Hardware_Network `protobuf:"bytes,6,opt,name=network,proto3" json:"network,omitempty"` // // A UUID representing a unique identifier for your hardware Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"` Version int64 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"` // // Metadata served by Hegel and that are accessible from the server itself To // know more about what Hegel is have a look at the documentation // https://docs.tinkerbell.org/services/hegel/ // // And at this URL you can find an explanation of how a metadata looks like: // https://docs.tinkerbell.org/about/hardware-data/ // Right now it is a string but we want to structure it a bit more. Metadata string `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
Hardware describes a specific device managed by Tinkerbell
func (*Hardware) Descriptor
deprecated
func (*Hardware) GetMetadata ¶
func (*Hardware) GetNetwork ¶
func (x *Hardware) GetNetwork() *Hardware_Network
func (*Hardware) GetVersion ¶
func (*Hardware) ProtoMessage ¶
func (*Hardware) ProtoMessage()
func (*Hardware) ProtoReflect ¶ added in v0.2.0
func (x *Hardware) ProtoReflect() protoreflect.Message
type HardwareServiceClient ¶
type HardwareServiceClient interface { // Push adds a new Hardware profile to the data store. Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) // ByMac returns the Hardware with the given hardware MAC Address. ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // ByIP returns the Hardware with the given IP Address. ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // ByID returns the Hardware with the given ID. ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // All returns all of the Hardware profiles. All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) // DeprecatedWatch watches for events on the given hardware and streams the matching Hardware. // We would like to keep Watch as the function used to stream events, // and ideally Watch should be more powerful than the DeprecatedWatch DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) // Delete deletes the given hardware from the data store. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) }
HardwareServiceClient is the client API for HardwareService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHardwareServiceClient ¶
func NewHardwareServiceClient(cc grpc.ClientConnInterface) HardwareServiceClient
type HardwareServiceClientMock ¶ added in v0.5.0
type HardwareServiceClientMock struct { // AllFunc mocks the All method. AllFunc func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) // ByIDFunc mocks the ByID method. ByIDFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // ByIPFunc mocks the ByIP method. ByIPFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // ByMACFunc mocks the ByMAC method. ByMACFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) // DeleteFunc mocks the Delete method. DeleteFunc func(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) // DeprecatedWatchFunc mocks the DeprecatedWatch method. DeprecatedWatchFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) // PushFunc mocks the Push method. PushFunc func(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) // contains filtered or unexported fields }
HardwareServiceClientMock is a mock implementation of HardwareServiceClient.
func TestSomethingThatUsesHardwareServiceClient(t *testing.T) { // make and configure a mocked HardwareServiceClient mockedHardwareServiceClient := &HardwareServiceClientMock{ AllFunc: func(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error) { panic("mock out the All method") }, ByIDFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { panic("mock out the ByID method") }, ByIPFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { panic("mock out the ByIP method") }, ByMACFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error) { panic("mock out the ByMAC method") }, DeleteFunc: func(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) { panic("mock out the Delete method") }, DeprecatedWatchFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error) { panic("mock out the DeprecatedWatch method") }, PushFunc: func(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error) { panic("mock out the Push method") }, } // use mockedHardwareServiceClient in code that requires HardwareServiceClient // and then make assertions. }
func (*HardwareServiceClientMock) All ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) All(ctx context.Context, in *Empty, opts ...grpc.CallOption) (HardwareService_AllClient, error)
All calls AllFunc.
func (*HardwareServiceClientMock) AllCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) AllCalls() []struct { Ctx context.Context In *Empty Opts []grpc.CallOption }
AllCalls gets all the calls that were made to All. Check the length with:
len(mockedHardwareServiceClient.AllCalls())
func (*HardwareServiceClientMock) ByID ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByID(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
ByID calls ByIDFunc.
func (*HardwareServiceClientMock) ByIDCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByIDCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
ByIDCalls gets all the calls that were made to ByID. Check the length with:
len(mockedHardwareServiceClient.ByIDCalls())
func (*HardwareServiceClientMock) ByIP ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByIP(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
ByIP calls ByIPFunc.
func (*HardwareServiceClientMock) ByIPCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByIPCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
ByIPCalls gets all the calls that were made to ByIP. Check the length with:
len(mockedHardwareServiceClient.ByIPCalls())
func (*HardwareServiceClientMock) ByMAC ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByMAC(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hardware, error)
ByMAC calls ByMACFunc.
func (*HardwareServiceClientMock) ByMACCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) ByMACCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
ByMACCalls gets all the calls that were made to ByMAC. Check the length with:
len(mockedHardwareServiceClient.ByMACCalls())
func (*HardwareServiceClientMock) Delete ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error)
Delete calls DeleteFunc.
func (*HardwareServiceClientMock) DeleteCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) DeleteCalls() []struct { Ctx context.Context In *DeleteRequest Opts []grpc.CallOption }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedHardwareServiceClient.DeleteCalls())
func (*HardwareServiceClientMock) DeprecatedWatch ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) DeprecatedWatch(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (HardwareService_DeprecatedWatchClient, error)
DeprecatedWatch calls DeprecatedWatchFunc.
func (*HardwareServiceClientMock) DeprecatedWatchCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) DeprecatedWatchCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
DeprecatedWatchCalls gets all the calls that were made to DeprecatedWatch. Check the length with:
len(mockedHardwareServiceClient.DeprecatedWatchCalls())
func (*HardwareServiceClientMock) Push ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*Empty, error)
Push calls PushFunc.
func (*HardwareServiceClientMock) PushCalls ¶ added in v0.5.0
func (mock *HardwareServiceClientMock) PushCalls() []struct { Ctx context.Context In *PushRequest Opts []grpc.CallOption }
PushCalls gets all the calls that were made to Push. Check the length with:
len(mockedHardwareServiceClient.PushCalls())
type HardwareServiceServer ¶
type HardwareServiceServer interface { // Push adds a new Hardware profile to the data store. Push(context.Context, *PushRequest) (*Empty, error) // ByMac returns the Hardware with the given hardware MAC Address. ByMAC(context.Context, *GetRequest) (*Hardware, error) // ByIP returns the Hardware with the given IP Address. ByIP(context.Context, *GetRequest) (*Hardware, error) // ByID returns the Hardware with the given ID. ByID(context.Context, *GetRequest) (*Hardware, error) // All returns all of the Hardware profiles. All(*Empty, HardwareService_AllServer) error // DeprecatedWatch watches for events on the given hardware and streams the matching Hardware. // We would like to keep Watch as the function used to stream events, // and ideally Watch should be more powerful than the DeprecatedWatch DeprecatedWatch(*GetRequest, HardwareService_DeprecatedWatchServer) error // Delete deletes the given hardware from the data store. Delete(context.Context, *DeleteRequest) (*Empty, error) }
HardwareServiceServer is the server API for HardwareService service. All implementations should embed UnimplementedHardwareServiceServer for forward compatibility
type HardwareService_AllClient ¶
type HardwareService_AllClient interface { Recv() (*Hardware, error) grpc.ClientStream }
type HardwareService_AllClientMock ¶ added in v0.5.0
type HardwareService_AllClientMock struct { // CloseSendFunc mocks the CloseSend method. CloseSendFunc func() error // ContextFunc mocks the Context method. ContextFunc func() context.Context // HeaderFunc mocks the Header method. HeaderFunc func() (metadata.MD, error) // RecvFunc mocks the Recv method. RecvFunc func() (*Hardware, error) // RecvMsgFunc mocks the RecvMsg method. RecvMsgFunc func(m interface{}) error // SendMsgFunc mocks the SendMsg method. SendMsgFunc func(m interface{}) error // TrailerFunc mocks the Trailer method. TrailerFunc func() metadata.MD // contains filtered or unexported fields }
HardwareService_AllClientMock is a mock implementation of HardwareService_AllClient.
func TestSomethingThatUsesHardwareService_AllClient(t *testing.T) { // make and configure a mocked HardwareService_AllClient mockedHardwareService_AllClient := &HardwareService_AllClientMock{ CloseSendFunc: func() error { panic("mock out the CloseSend method") }, ContextFunc: func() context.Context { panic("mock out the Context method") }, HeaderFunc: func() (metadata.MD, error) { panic("mock out the Header method") }, RecvFunc: func() (*Hardware, error) { panic("mock out the Recv method") }, RecvMsgFunc: func(m interface{}) error { panic("mock out the RecvMsg method") }, SendMsgFunc: func(m interface{}) error { panic("mock out the SendMsg method") }, TrailerFunc: func() metadata.MD { panic("mock out the Trailer method") }, } // use mockedHardwareService_AllClient in code that requires HardwareService_AllClient // and then make assertions. }
func (*HardwareService_AllClientMock) CloseSend ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) CloseSend() error
CloseSend calls CloseSendFunc.
func (*HardwareService_AllClientMock) CloseSendCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) CloseSendCalls() []struct{}
CloseSendCalls gets all the calls that were made to CloseSend. Check the length with:
len(mockedHardwareService_AllClient.CloseSendCalls())
func (*HardwareService_AllClientMock) Context ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) Context() context.Context
Context calls ContextFunc.
func (*HardwareService_AllClientMock) ContextCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) ContextCalls() []struct{}
ContextCalls gets all the calls that were made to Context. Check the length with:
len(mockedHardwareService_AllClient.ContextCalls())
func (*HardwareService_AllClientMock) Header ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) Header() (metadata.MD, error)
Header calls HeaderFunc.
func (*HardwareService_AllClientMock) HeaderCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) HeaderCalls() []struct{}
HeaderCalls gets all the calls that were made to Header. Check the length with:
len(mockedHardwareService_AllClient.HeaderCalls())
func (*HardwareService_AllClientMock) Recv ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) Recv() (*Hardware, error)
Recv calls RecvFunc.
func (*HardwareService_AllClientMock) RecvCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) RecvCalls() []struct{}
RecvCalls gets all the calls that were made to Recv. Check the length with:
len(mockedHardwareService_AllClient.RecvCalls())
func (*HardwareService_AllClientMock) RecvMsg ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) RecvMsg(m interface{}) error
RecvMsg calls RecvMsgFunc.
func (*HardwareService_AllClientMock) RecvMsgCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) RecvMsgCalls() []struct { M interface{} }
RecvMsgCalls gets all the calls that were made to RecvMsg. Check the length with:
len(mockedHardwareService_AllClient.RecvMsgCalls())
func (*HardwareService_AllClientMock) SendMsg ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) SendMsg(m interface{}) error
SendMsg calls SendMsgFunc.
func (*HardwareService_AllClientMock) SendMsgCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) SendMsgCalls() []struct { M interface{} }
SendMsgCalls gets all the calls that were made to SendMsg. Check the length with:
len(mockedHardwareService_AllClient.SendMsgCalls())
func (*HardwareService_AllClientMock) Trailer ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) Trailer() metadata.MD
Trailer calls TrailerFunc.
func (*HardwareService_AllClientMock) TrailerCalls ¶ added in v0.5.0
func (mock *HardwareService_AllClientMock) TrailerCalls() []struct{}
TrailerCalls gets all the calls that were made to Trailer. Check the length with:
len(mockedHardwareService_AllClient.TrailerCalls())
type HardwareService_AllServer ¶
type HardwareService_AllServer interface { Send(*Hardware) error grpc.ServerStream }
type HardwareService_DeprecatedWatchClient ¶ added in v0.3.0
type HardwareService_DeprecatedWatchClient interface { Recv() (*Hardware, error) grpc.ClientStream }
type HardwareService_DeprecatedWatchServer ¶ added in v0.3.0
type HardwareService_DeprecatedWatchServer interface { Send(*Hardware) error grpc.ServerStream }
type Hardware_DHCP ¶
type Hardware_DHCP struct { // // The MAC address for your hardware. It is important to get it // right because it is used from Tinkerbell to dispatch workflows to the // right destination. Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` // // Hostname represents the hostname of your server Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` LeaseTime int64 `protobuf:"varint,4,opt,name=lease_time,json=leaseTime,proto3" json:"lease_time,omitempty"` // NameServers []string `protobuf:"bytes,5,rep,name=name_servers,json=nameServers,proto3" json:"name_servers,omitempty"` // TimeServers []string `protobuf:"bytes,6,rep,name=time_servers,json=timeServers,proto3" json:"time_servers,omitempty"` // // The CPU architecture like arm64, amd64, x86_64 and so on. Arch string `protobuf:"bytes,8,opt,name=arch,proto3" json:"arch,omitempty"` Uefi bool `protobuf:"varint,9,opt,name=uefi,proto3" json:"uefi,omitempty"` // // The name of the interface in your hardware like eth0, en1 and so on. IfaceName string `protobuf:"bytes,10,opt,name=iface_name,json=ifaceName,proto3" json:"iface_name,omitempty"` // // Ip *Hardware_DHCP_IP `protobuf:"bytes,11,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
DHCP represents
func (*Hardware_DHCP) Descriptor
deprecated
func (*Hardware_DHCP) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_DHCP.ProtoReflect.Descriptor instead.
func (*Hardware_DHCP) GetArch ¶
func (x *Hardware_DHCP) GetArch() string
func (*Hardware_DHCP) GetHostname ¶
func (x *Hardware_DHCP) GetHostname() string
func (*Hardware_DHCP) GetIfaceName ¶
func (x *Hardware_DHCP) GetIfaceName() string
func (*Hardware_DHCP) GetIp ¶
func (x *Hardware_DHCP) GetIp() *Hardware_DHCP_IP
func (*Hardware_DHCP) GetLeaseTime ¶
func (x *Hardware_DHCP) GetLeaseTime() int64
func (*Hardware_DHCP) GetMac ¶
func (x *Hardware_DHCP) GetMac() string
func (*Hardware_DHCP) GetNameServers ¶
func (x *Hardware_DHCP) GetNameServers() []string
func (*Hardware_DHCP) GetTimeServers ¶
func (x *Hardware_DHCP) GetTimeServers() []string
func (*Hardware_DHCP) GetUefi ¶
func (x *Hardware_DHCP) GetUefi() bool
func (*Hardware_DHCP) ProtoMessage ¶
func (*Hardware_DHCP) ProtoMessage()
func (*Hardware_DHCP) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_DHCP) ProtoReflect() protoreflect.Message
func (*Hardware_DHCP) Reset ¶
func (x *Hardware_DHCP) Reset()
func (*Hardware_DHCP) String ¶
func (x *Hardware_DHCP) String() string
type Hardware_DHCP_IP ¶
type Hardware_DHCP_IP struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask,omitempty"` Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` Family int64 `protobuf:"varint,4,opt,name=family,proto3" json:"family,omitempty"` // contains filtered or unexported fields }
func (*Hardware_DHCP_IP) Descriptor
deprecated
func (*Hardware_DHCP_IP) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_DHCP_IP.ProtoReflect.Descriptor instead.
func (*Hardware_DHCP_IP) GetAddress ¶
func (x *Hardware_DHCP_IP) GetAddress() string
func (*Hardware_DHCP_IP) GetFamily ¶
func (x *Hardware_DHCP_IP) GetFamily() int64
func (*Hardware_DHCP_IP) GetGateway ¶
func (x *Hardware_DHCP_IP) GetGateway() string
func (*Hardware_DHCP_IP) GetNetmask ¶
func (x *Hardware_DHCP_IP) GetNetmask() string
func (*Hardware_DHCP_IP) ProtoMessage ¶
func (*Hardware_DHCP_IP) ProtoMessage()
func (*Hardware_DHCP_IP) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_DHCP_IP) ProtoReflect() protoreflect.Message
func (*Hardware_DHCP_IP) Reset ¶
func (x *Hardware_DHCP_IP) Reset()
func (*Hardware_DHCP_IP) String ¶
func (x *Hardware_DHCP_IP) String() string
type Hardware_Netboot ¶
type Hardware_Netboot struct { // // This is a boolean value that tells to Tinkerbell if the hardware has PXE // enabled. If set to false Tinkerbell won't attempt a provisioning at the // moment. AllowPxe bool `protobuf:"varint,1,opt,name=allow_pxe,json=allowPxe,proto3" json:"allow_pxe,omitempty"` // // When set to true Osie will lookup and execute the workflows assigned to // a particular hardware. // // When set to false Osie will be executed but no workflows will be // applied. This is useful if you don't want to execute any workflows but // you simply need an operating system running in memory AllowWorkflow bool `protobuf:"varint,2,opt,name=allow_workflow,json=allowWorkflow,proto3" json:"allow_workflow,omitempty"` // // Ipxe *Hardware_Netboot_IPXE `protobuf:"bytes,3,opt,name=ipxe,proto3" json:"ipxe,omitempty"` // // Osie *Hardware_Netboot_Osie `protobuf:"bytes,5,opt,name=osie,proto3" json:"osie,omitempty"` // contains filtered or unexported fields }
Netboot is the model used to represent and configure the netbooting behavior From there you can customise the IPXE chained during boot, the in memory operating system tand so on.
func (*Hardware_Netboot) Descriptor
deprecated
func (*Hardware_Netboot) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_Netboot.ProtoReflect.Descriptor instead.
func (*Hardware_Netboot) GetAllowPxe ¶
func (x *Hardware_Netboot) GetAllowPxe() bool
func (*Hardware_Netboot) GetAllowWorkflow ¶
func (x *Hardware_Netboot) GetAllowWorkflow() bool
func (*Hardware_Netboot) GetIpxe ¶
func (x *Hardware_Netboot) GetIpxe() *Hardware_Netboot_IPXE
func (*Hardware_Netboot) GetOsie ¶
func (x *Hardware_Netboot) GetOsie() *Hardware_Netboot_Osie
func (*Hardware_Netboot) ProtoMessage ¶
func (*Hardware_Netboot) ProtoMessage()
func (*Hardware_Netboot) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_Netboot) ProtoReflect() protoreflect.Message
func (*Hardware_Netboot) Reset ¶
func (x *Hardware_Netboot) Reset()
func (*Hardware_Netboot) String ¶
func (x *Hardware_Netboot) String() string
type Hardware_Netboot_IPXE ¶
type Hardware_Netboot_IPXE struct { // // This is the location of the IPXE script Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Contents string `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` // contains filtered or unexported fields }
IPXE is the network boot firmware Tinkerbell uses to start the provisioning in the hardware
func (*Hardware_Netboot_IPXE) Descriptor
deprecated
func (*Hardware_Netboot_IPXE) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_Netboot_IPXE.ProtoReflect.Descriptor instead.
func (*Hardware_Netboot_IPXE) GetContents ¶
func (x *Hardware_Netboot_IPXE) GetContents() string
func (*Hardware_Netboot_IPXE) GetUrl ¶
func (x *Hardware_Netboot_IPXE) GetUrl() string
func (*Hardware_Netboot_IPXE) ProtoMessage ¶
func (*Hardware_Netboot_IPXE) ProtoMessage()
func (*Hardware_Netboot_IPXE) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_Netboot_IPXE) ProtoReflect() protoreflect.Message
func (*Hardware_Netboot_IPXE) Reset ¶
func (x *Hardware_Netboot_IPXE) Reset()
func (*Hardware_Netboot_IPXE) String ¶
func (x *Hardware_Netboot_IPXE) String() string
type Hardware_Netboot_Osie ¶
type Hardware_Netboot_Osie struct { BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` Kernel string `protobuf:"bytes,2,opt,name=kernel,proto3" json:"kernel,omitempty"` Initrd string `protobuf:"bytes,3,opt,name=initrd,proto3" json:"initrd,omitempty"` // contains filtered or unexported fields }
Osie is the in memory operating system
func (*Hardware_Netboot_Osie) Descriptor
deprecated
func (*Hardware_Netboot_Osie) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_Netboot_Osie.ProtoReflect.Descriptor instead.
func (*Hardware_Netboot_Osie) GetBaseUrl ¶
func (x *Hardware_Netboot_Osie) GetBaseUrl() string
func (*Hardware_Netboot_Osie) GetInitrd ¶
func (x *Hardware_Netboot_Osie) GetInitrd() string
func (*Hardware_Netboot_Osie) GetKernel ¶
func (x *Hardware_Netboot_Osie) GetKernel() string
func (*Hardware_Netboot_Osie) ProtoMessage ¶
func (*Hardware_Netboot_Osie) ProtoMessage()
func (*Hardware_Netboot_Osie) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_Netboot_Osie) ProtoReflect() protoreflect.Message
func (*Hardware_Netboot_Osie) Reset ¶
func (x *Hardware_Netboot_Osie) Reset()
func (*Hardware_Netboot_Osie) String ¶
func (x *Hardware_Netboot_Osie) String() string
type Hardware_Network ¶
type Hardware_Network struct { // // Configure the network interfaces you have in your hardware and defines their // behavior. Interfaces []*Hardware_Network_Interface `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"` // contains filtered or unexported fields }
Network describes the networking you expect in your hardware. The number of interfaces, their name, gateway and IP.
func (*Hardware_Network) Descriptor
deprecated
func (*Hardware_Network) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_Network.ProtoReflect.Descriptor instead.
func (*Hardware_Network) GetInterfaces ¶
func (x *Hardware_Network) GetInterfaces() []*Hardware_Network_Interface
func (*Hardware_Network) ProtoMessage ¶
func (*Hardware_Network) ProtoMessage()
func (*Hardware_Network) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_Network) ProtoReflect() protoreflect.Message
func (*Hardware_Network) Reset ¶
func (x *Hardware_Network) Reset()
func (*Hardware_Network) String ¶
func (x *Hardware_Network) String() string
type Hardware_Network_Interface ¶
type Hardware_Network_Interface struct { // // DHCP configures the behavior of DHCP connection for your hardware. // IP you expect, gateway and netmask. Dhcp *Hardware_DHCP `protobuf:"bytes,1,opt,name=dhcp,proto3" json:"dhcp,omitempty"` // // Netboot pilots netbooting. You can select Osie, the in memory // operating system used during netbooting. Netboot *Hardware_Netboot `protobuf:"bytes,2,opt,name=netboot,proto3" json:"netboot,omitempty"` // contains filtered or unexported fields }
Interface represents a single network interface in your hardware
func (*Hardware_Network_Interface) Descriptor
deprecated
func (*Hardware_Network_Interface) Descriptor() ([]byte, []int)
Deprecated: Use Hardware_Network_Interface.ProtoReflect.Descriptor instead.
func (*Hardware_Network_Interface) GetDhcp ¶
func (x *Hardware_Network_Interface) GetDhcp() *Hardware_DHCP
func (*Hardware_Network_Interface) GetNetboot ¶
func (x *Hardware_Network_Interface) GetNetboot() *Hardware_Netboot
func (*Hardware_Network_Interface) ProtoMessage ¶
func (*Hardware_Network_Interface) ProtoMessage()
func (*Hardware_Network_Interface) ProtoReflect ¶ added in v0.2.0
func (x *Hardware_Network_Interface) ProtoReflect() protoreflect.Message
func (*Hardware_Network_Interface) Reset ¶
func (x *Hardware_Network_Interface) Reset()
func (*Hardware_Network_Interface) String ¶
func (x *Hardware_Network_Interface) String() string
type PushRequest ¶
type PushRequest struct { // // Hardware describes the hardware you want to register to Tinkerbell and // what it looks like. // Hostname, MAC address, DHCP, network interfaces, metadata and so on. Data *Hardware `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
PushRequest is the body for the Push method. It contains information about a piece of hardware.
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetData ¶
func (x *PushRequest) GetData() *Hardware
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶ added in v0.2.0
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type UnimplementedHardwareServiceServer ¶
type UnimplementedHardwareServiceServer struct{}
UnimplementedHardwareServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedHardwareServiceServer) ByID ¶
func (UnimplementedHardwareServiceServer) ByID(context.Context, *GetRequest) (*Hardware, error)
func (UnimplementedHardwareServiceServer) ByIP ¶
func (UnimplementedHardwareServiceServer) ByIP(context.Context, *GetRequest) (*Hardware, error)
func (UnimplementedHardwareServiceServer) ByMAC ¶
func (UnimplementedHardwareServiceServer) ByMAC(context.Context, *GetRequest) (*Hardware, error)
func (UnimplementedHardwareServiceServer) Delete ¶
func (UnimplementedHardwareServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
func (UnimplementedHardwareServiceServer) DeprecatedWatch ¶ added in v0.3.0
func (UnimplementedHardwareServiceServer) DeprecatedWatch(*GetRequest, HardwareService_DeprecatedWatchServer) error
func (UnimplementedHardwareServiceServer) Push ¶
func (UnimplementedHardwareServiceServer) Push(context.Context, *PushRequest) (*Empty, error)
type UnsafeHardwareServiceServer ¶ added in v0.7.0
type UnsafeHardwareServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHardwareServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HardwareServiceServer will result in compilation errors.