mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
385 lines
12 KiB
Go
385 lines
12 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: seaweed.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package pb is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
seaweed.proto
|
|
|
|
It has these top-level messages:
|
|
Heartbeat
|
|
HeartbeatResponse
|
|
VolumeInformationMessage
|
|
*/
|
|
package pb
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Heartbeat struct {
|
|
Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
|
|
Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
|
|
PublicUrl string `protobuf:"bytes,3,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
|
|
MaxVolumeCount uint32 `protobuf:"varint,4,opt,name=max_volume_count,json=maxVolumeCount" json:"max_volume_count,omitempty"`
|
|
MaxFileKey uint64 `protobuf:"varint,5,opt,name=max_file_key,json=maxFileKey" json:"max_file_key,omitempty"`
|
|
DataCenter string `protobuf:"bytes,6,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"`
|
|
Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
|
|
AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
|
|
Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
|
|
}
|
|
|
|
func (m *Heartbeat) Reset() { *m = Heartbeat{} }
|
|
func (m *Heartbeat) String() string { return proto.CompactTextString(m) }
|
|
func (*Heartbeat) ProtoMessage() {}
|
|
func (*Heartbeat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *Heartbeat) GetIp() string {
|
|
if m != nil {
|
|
return m.Ip
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Heartbeat) GetPort() uint32 {
|
|
if m != nil {
|
|
return m.Port
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Heartbeat) GetPublicUrl() string {
|
|
if m != nil {
|
|
return m.PublicUrl
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Heartbeat) GetMaxVolumeCount() uint32 {
|
|
if m != nil {
|
|
return m.MaxVolumeCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Heartbeat) GetMaxFileKey() uint64 {
|
|
if m != nil {
|
|
return m.MaxFileKey
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Heartbeat) GetDataCenter() string {
|
|
if m != nil {
|
|
return m.DataCenter
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Heartbeat) GetRack() string {
|
|
if m != nil {
|
|
return m.Rack
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Heartbeat) GetAdminPort() uint32 {
|
|
if m != nil {
|
|
return m.AdminPort
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
|
|
if m != nil {
|
|
return m.Volumes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type HeartbeatResponse struct {
|
|
VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"`
|
|
SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"`
|
|
Leader string `protobuf:"bytes,3,opt,name=leader" json:"leader,omitempty"`
|
|
}
|
|
|
|
func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
|
|
func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*HeartbeatResponse) ProtoMessage() {}
|
|
func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *HeartbeatResponse) GetVolumeSizeLimit() uint64 {
|
|
if m != nil {
|
|
return m.VolumeSizeLimit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *HeartbeatResponse) GetSecretKey() string {
|
|
if m != nil {
|
|
return m.SecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *HeartbeatResponse) GetLeader() string {
|
|
if m != nil {
|
|
return m.Leader
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type VolumeInformationMessage struct {
|
|
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
|
|
Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
|
|
Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
|
|
FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
|
|
DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
|
|
DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
|
|
ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
|
|
ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
|
|
Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
|
|
Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
|
|
func (m *VolumeInformationMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*VolumeInformationMessage) ProtoMessage() {}
|
|
func (*VolumeInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
func (m *VolumeInformationMessage) GetId() uint32 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetSize() uint64 {
|
|
if m != nil {
|
|
return m.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetCollection() string {
|
|
if m != nil {
|
|
return m.Collection
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetFileCount() uint64 {
|
|
if m != nil {
|
|
return m.FileCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetDeleteCount() uint64 {
|
|
if m != nil {
|
|
return m.DeleteCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetDeletedByteCount() uint64 {
|
|
if m != nil {
|
|
return m.DeletedByteCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetReadOnly() bool {
|
|
if m != nil {
|
|
return m.ReadOnly
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetReplicaPlacement() uint32 {
|
|
if m != nil {
|
|
return m.ReplicaPlacement
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetVersion() uint32 {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *VolumeInformationMessage) GetTtl() uint32 {
|
|
if m != nil {
|
|
return m.Ttl
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Heartbeat)(nil), "pb.Heartbeat")
|
|
proto.RegisterType((*HeartbeatResponse)(nil), "pb.HeartbeatResponse")
|
|
proto.RegisterType((*VolumeInformationMessage)(nil), "pb.VolumeInformationMessage")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Seaweed service
|
|
|
|
type SeaweedClient interface {
|
|
SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
|
|
}
|
|
|
|
type seaweedClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewSeaweedClient(cc *grpc.ClientConn) SeaweedClient {
|
|
return &seaweedClient{cc}
|
|
}
|
|
|
|
func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
|
|
stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[0], c.cc, "/pb.Seaweed/SendHeartbeat", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &seaweedSendHeartbeatClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type Seaweed_SendHeartbeatClient interface {
|
|
Send(*Heartbeat) error
|
|
Recv() (*HeartbeatResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type seaweedSendHeartbeatClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
|
|
m := new(HeartbeatResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// Server API for Seaweed service
|
|
|
|
type SeaweedServer interface {
|
|
SendHeartbeat(Seaweed_SendHeartbeatServer) error
|
|
}
|
|
|
|
func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
|
|
s.RegisterService(&_Seaweed_serviceDesc, srv)
|
|
}
|
|
|
|
func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
|
|
}
|
|
|
|
type Seaweed_SendHeartbeatServer interface {
|
|
Send(*HeartbeatResponse) error
|
|
Recv() (*Heartbeat, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type seaweedSendHeartbeatServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
|
|
m := new(Heartbeat)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _Seaweed_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.Seaweed",
|
|
HandlerType: (*SeaweedServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "SendHeartbeat",
|
|
Handler: _Seaweed_SendHeartbeat_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "seaweed.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 498 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x6e, 0xd3, 0x30,
|
|
0x14, 0xc6, 0x49, 0x1a, 0xda, 0xe6, 0x74, 0x1d, 0x9d, 0x25, 0x90, 0x05, 0x03, 0x4a, 0xaf, 0x22,
|
|
0x81, 0x2a, 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