pb

package
v0.0.0-...-4284221 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

protoc --go_out=plugins=grpc:. rpc.proto

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*NeedlePb) GetCheckSum

func (m *NeedlePb) GetCheckSum() uint32

func (*NeedlePb) GetFileBytes

func (m *NeedlePb) GetFileBytes() []byte

func (*NeedlePb) GetFileName

func (m *NeedlePb) GetFileName() string

func (*NeedlePb) GetFileSize

func (m *NeedlePb) GetFileSize() uint32

func (*NeedlePb) GetFlags

func (m *NeedlePb) GetFlags() uint32

func (*NeedlePb) GetHaystackId

func (m *NeedlePb) GetHaystackId() uint32

func (*NeedlePb) GetId

func (m *NeedlePb) GetId() uint64

func (*NeedlePb) GetMimeType

func (m *NeedlePb) GetMimeType() string

func (*NeedlePb) GetOffset

func (m *NeedlePb) GetOffset() uint32

func (*NeedlePb) GetStoreIpPort

func (m *NeedlePb) GetStoreIpPort() string

func (*NeedlePb) ProtoMessage

func (*NeedlePb) ProtoMessage()

func (*NeedlePb) Reset

func (m *NeedlePb) Reset()

func (*NeedlePb) String

func (m *NeedlePb) String() string

func (*NeedlePb) XXX_DiscardUnknown

func (m *NeedlePb) XXX_DiscardUnknown()

func (*NeedlePb) XXX_Marshal

func (m *NeedlePb) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NeedlePb) XXX_Merge

func (m *NeedlePb) XXX_Merge(src proto.Message)

func (*NeedlePb) XXX_Size

func (m *NeedlePb) XXX_Size() int

func (*NeedlePb) XXX_Unmarshal

func (m *NeedlePb) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Node) GetStoreName

func (m *Node) GetStoreName() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

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.

Jump to

Keyboard shortcuts

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