Documentation ¶
Index ¶
- func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer)
- type NeedlePb
- func (*NeedlePb) Descriptor() ([]byte, []int)
- func (m *NeedlePb) GetCheckSum() uint32
- func (m *NeedlePb) GetFileBytes() []byte
- func (m *NeedlePb) GetFileName() string
- func (m *NeedlePb) GetFileSize() uint32
- func (m *NeedlePb) GetFlags() uint32
- func (m *NeedlePb) GetHaystackId() uint32
- func (m *NeedlePb) GetId() uint64
- func (m *NeedlePb) GetMimeType() string
- func (m *NeedlePb) GetOffset() uint32
- func (m *NeedlePb) GetStoreIpPort() string
- func (*NeedlePb) ProtoMessage()
- func (m *NeedlePb) Reset()
- func (m *NeedlePb) String() string
- func (m *NeedlePb) XXX_DiscardUnknown()
- func (m *NeedlePb) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NeedlePb) XXX_Merge(src proto.Message)
- func (m *NeedlePb) XXX_Size() int
- func (m *NeedlePb) XXX_Unmarshal(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetStoreName() string
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type NodeStatus
- func (*NodeStatus) Descriptor() ([]byte, []int)
- func (m *NodeStatus) GetCapacity() uint64
- func (m *NodeStatus) GetFileCount() uint32
- func (m *NodeStatus) GetName() string
- func (m *NodeStatus) GetStartTs() uint64
- func (m *NodeStatus) GetUsed() uint64
- func (*NodeStatus) ProtoMessage()
- func (m *NodeStatus) Reset()
- func (m *NodeStatus) String() string
- func (m *NodeStatus) XXX_DiscardUnknown()
- func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeStatus) XXX_Merge(src proto.Message)
- func (m *NodeStatus) XXX_Size() int
- func (m *NodeStatus) XXX_Unmarshal(b []byte) error
- type RpcServiceClient
- type RpcServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRpcServiceServer ¶
func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer)
Types ¶
type NeedlePb ¶
type NeedlePb struct { Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` StoreIpPort string `protobuf:"bytes,2,opt,name=StoreIpPort,proto3" json:"StoreIpPort,omitempty"` HaystackId uint32 `protobuf:"fixed32,3,opt,name=HaystackId,proto3" json:"HaystackId,omitempty"` Offset uint32 `protobuf:"fixed32,4,opt,name=Offset,proto3" json:"Offset,omitempty"` Flags uint32 `protobuf:"fixed32,5,opt,name=Flags,proto3" json:"Flags,omitempty"` FileName string `protobuf:"bytes,6,opt,name=FileName,proto3" json:"FileName,omitempty"` FileSize uint32 `protobuf:"fixed32,7,opt,name=FileSize,proto3" json:"FileSize,omitempty"` MimeType string `protobuf:"bytes,8,opt,name=MimeType,proto3" json:"MimeType,omitempty"` CheckSum uint32 `protobuf:"fixed32,9,opt,name=CheckSum,proto3" json:"CheckSum,omitempty"` FileBytes []byte `protobuf:"bytes,10,opt,name=FileBytes,proto3" json:"FileBytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NeedlePb) Descriptor ¶
func (*NeedlePb) GetCheckSum ¶
func (*NeedlePb) GetFileBytes ¶
func (*NeedlePb) GetFileName ¶
func (*NeedlePb) GetFileSize ¶
func (*NeedlePb) GetHaystackId ¶
func (*NeedlePb) GetMimeType ¶
func (*NeedlePb) GetStoreIpPort ¶
func (*NeedlePb) ProtoMessage ¶
func (*NeedlePb) ProtoMessage()
func (*NeedlePb) XXX_DiscardUnknown ¶
func (m *NeedlePb) XXX_DiscardUnknown()
func (*NeedlePb) XXX_Marshal ¶
func (*NeedlePb) XXX_Unmarshal ¶
type Node ¶
type Node struct { StoreName string `protobuf:"bytes,1,opt,name=StoreName,proto3" json:"StoreName,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Node) Descriptor ¶
func (*Node) GetStoreName ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type NodeStatus ¶
type NodeStatus struct { Capacity uint64 `protobuf:"varint,1,opt,name=Capacity,proto3" json:"Capacity,omitempty"` Used uint64 `protobuf:"varint,2,opt,name=Used,proto3" json:"Used,omitempty"` FileCount uint32 `protobuf:"fixed32,3,opt,name=FileCount,proto3" json:"FileCount,omitempty"` StartTs uint64 `protobuf:"varint,4,opt,name=StartTs,proto3" json:"StartTs,omitempty"` Name string `protobuf:"bytes,5,opt,name=Name,proto3" json:"Name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NodeStatus) Descriptor ¶
func (*NodeStatus) Descriptor() ([]byte, []int)
func (*NodeStatus) GetCapacity ¶
func (m *NodeStatus) GetCapacity() uint64
func (*NodeStatus) GetFileCount ¶
func (m *NodeStatus) GetFileCount() uint32
func (*NodeStatus) GetName ¶
func (m *NodeStatus) GetName() string
func (*NodeStatus) GetStartTs ¶
func (m *NodeStatus) GetStartTs() uint64
func (*NodeStatus) GetUsed ¶
func (m *NodeStatus) GetUsed() uint64
func (*NodeStatus) ProtoMessage ¶
func (*NodeStatus) ProtoMessage()
func (*NodeStatus) Reset ¶
func (m *NodeStatus) Reset()
func (*NodeStatus) String ¶
func (m *NodeStatus) String() string
func (*NodeStatus) XXX_DiscardUnknown ¶
func (m *NodeStatus) XXX_DiscardUnknown()
func (*NodeStatus) XXX_Marshal ¶
func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeStatus) XXX_Merge ¶
func (m *NodeStatus) XXX_Merge(src proto.Message)
func (*NodeStatus) XXX_Size ¶
func (m *NodeStatus) XXX_Size() int
func (*NodeStatus) XXX_Unmarshal ¶
func (m *NodeStatus) XXX_Unmarshal(b []byte) error
type RpcServiceClient ¶
type RpcServiceClient interface { // Sends a greeting WriteFile(ctx context.Context, in *NeedlePb, opts ...grpc.CallOption) (*NeedlePb, error) ReadFile(ctx context.Context, in *NeedlePb, opts ...grpc.CallOption) (*NeedlePb, error) Status(ctx context.Context, in *Node, opts ...grpc.CallOption) (*NodeStatus, error) }
RpcServiceClient is the client API for RpcService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRpcServiceClient ¶
func NewRpcServiceClient(cc *grpc.ClientConn) RpcServiceClient
type RpcServiceServer ¶
type RpcServiceServer interface { // Sends a greeting WriteFile(context.Context, *NeedlePb) (*NeedlePb, error) ReadFile(context.Context, *NeedlePb) (*NeedlePb, error) Status(context.Context, *Node) (*NodeStatus, error) }
RpcServiceServer is the server API for RpcService service.
Click to show internal directories.
Click to hide internal directories.