123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v3.21.12
- // source: master.proto
- package master_pb
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // SeaweedClient is the client API for Seaweed 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.
- type SeaweedClient interface {
- SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
- KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error)
- LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error)
- Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error)
- Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error)
- CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error)
- CollectionDelete(ctx context.Context, in *CollectionDeleteRequest, opts ...grpc.CallOption) (*CollectionDeleteResponse, error)
- VolumeList(ctx context.Context, in *VolumeListRequest, opts ...grpc.CallOption) (*VolumeListResponse, error)
- LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error)
- VacuumVolume(ctx context.Context, in *VacuumVolumeRequest, opts ...grpc.CallOption) (*VacuumVolumeResponse, error)
- DisableVacuum(ctx context.Context, in *DisableVacuumRequest, opts ...grpc.CallOption) (*DisableVacuumResponse, error)
- EnableVacuum(ctx context.Context, in *EnableVacuumRequest, opts ...grpc.CallOption) (*EnableVacuumResponse, error)
- VolumeMarkReadonly(ctx context.Context, in *VolumeMarkReadonlyRequest, opts ...grpc.CallOption) (*VolumeMarkReadonlyResponse, error)
- GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error)
- ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error)
- LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error)
- ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error)
- Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
- RaftListClusterServers(ctx context.Context, in *RaftListClusterServersRequest, opts ...grpc.CallOption) (*RaftListClusterServersResponse, error)
- RaftAddServer(ctx context.Context, in *RaftAddServerRequest, opts ...grpc.CallOption) (*RaftAddServerResponse, error)
- RaftRemoveServer(ctx context.Context, in *RaftRemoveServerRequest, opts ...grpc.CallOption) (*RaftRemoveServerResponse, error)
- }
- type seaweedClient struct {
- cc grpc.ClientConnInterface
- }
- func NewSeaweedClient(cc grpc.ClientConnInterface) SeaweedClient {
- return &seaweedClient{cc}
- }
- func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
- stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[0], "/master_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
- }
- func (c *seaweedClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error) {
- stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[1], "/master_pb.Seaweed/KeepConnected", opts...)
- if err != nil {
- return nil, err
- }
- x := &seaweedKeepConnectedClient{stream}
- return x, nil
- }
- type Seaweed_KeepConnectedClient interface {
- Send(*KeepConnectedRequest) error
- Recv() (*KeepConnectedResponse, error)
- grpc.ClientStream
- }
- type seaweedKeepConnectedClient struct {
- grpc.ClientStream
- }
- func (x *seaweedKeepConnectedClient) Send(m *KeepConnectedRequest) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *seaweedKeepConnectedClient) Recv() (*KeepConnectedResponse, error) {
- m := new(KeepConnectedResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func (c *seaweedClient) LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error) {
- out := new(LookupVolumeResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupVolume", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error) {
- out := new(AssignResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Assign", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error) {
- out := new(StatisticsResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Statistics", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error) {
- out := new(CollectionListResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) CollectionDelete(ctx context.Context, in *CollectionDeleteRequest, opts ...grpc.CallOption) (*CollectionDeleteResponse, error) {
- out := new(CollectionDeleteResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionDelete", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) VolumeList(ctx context.Context, in *VolumeListRequest, opts ...grpc.CallOption) (*VolumeListResponse, error) {
- out := new(VolumeListResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VolumeList", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error) {
- out := new(LookupEcVolumeResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupEcVolume", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) VacuumVolume(ctx context.Context, in *VacuumVolumeRequest, opts ...grpc.CallOption) (*VacuumVolumeResponse, error) {
- out := new(VacuumVolumeResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VacuumVolume", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) DisableVacuum(ctx context.Context, in *DisableVacuumRequest, opts ...grpc.CallOption) (*DisableVacuumResponse, error) {
- out := new(DisableVacuumResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/DisableVacuum", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) EnableVacuum(ctx context.Context, in *EnableVacuumRequest, opts ...grpc.CallOption) (*EnableVacuumResponse, error) {
- out := new(EnableVacuumResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/EnableVacuum", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) VolumeMarkReadonly(ctx context.Context, in *VolumeMarkReadonlyRequest, opts ...grpc.CallOption) (*VolumeMarkReadonlyResponse, error) {
- out := new(VolumeMarkReadonlyResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VolumeMarkReadonly", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error) {
- out := new(GetMasterConfigurationResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/GetMasterConfiguration", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error) {
- out := new(ListClusterNodesResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ListClusterNodes", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error) {
- out := new(LeaseAdminTokenResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LeaseAdminToken", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error) {
- out := new(ReleaseAdminTokenResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ReleaseAdminToken", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
- out := new(PingResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Ping", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) RaftListClusterServers(ctx context.Context, in *RaftListClusterServersRequest, opts ...grpc.CallOption) (*RaftListClusterServersResponse, error) {
- out := new(RaftListClusterServersResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftListClusterServers", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) RaftAddServer(ctx context.Context, in *RaftAddServerRequest, opts ...grpc.CallOption) (*RaftAddServerResponse, error) {
- out := new(RaftAddServerResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftAddServer", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *seaweedClient) RaftRemoveServer(ctx context.Context, in *RaftRemoveServerRequest, opts ...grpc.CallOption) (*RaftRemoveServerResponse, error) {
- out := new(RaftRemoveServerResponse)
- err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftRemoveServer", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // SeaweedServer is the server API for Seaweed service.
- // All implementations must embed UnimplementedSeaweedServer
- // for forward compatibility
- type SeaweedServer interface {
- SendHeartbeat(Seaweed_SendHeartbeatServer) error
- KeepConnected(Seaweed_KeepConnectedServer) error
- LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error)
- Assign(context.Context, *AssignRequest) (*AssignResponse, error)
- Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error)
- CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error)
- CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error)
- VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error)
- LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error)
- VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error)
- DisableVacuum(context.Context, *DisableVacuumRequest) (*DisableVacuumResponse, error)
- EnableVacuum(context.Context, *EnableVacuumRequest) (*EnableVacuumResponse, error)
- VolumeMarkReadonly(context.Context, *VolumeMarkReadonlyRequest) (*VolumeMarkReadonlyResponse, error)
- GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error)
- ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error)
- LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error)
- ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error)
- Ping(context.Context, *PingRequest) (*PingResponse, error)
- RaftListClusterServers(context.Context, *RaftListClusterServersRequest) (*RaftListClusterServersResponse, error)
- RaftAddServer(context.Context, *RaftAddServerRequest) (*RaftAddServerResponse, error)
- RaftRemoveServer(context.Context, *RaftRemoveServerRequest) (*RaftRemoveServerResponse, error)
- mustEmbedUnimplementedSeaweedServer()
- }
- // UnimplementedSeaweedServer must be embedded to have forward compatible implementations.
- type UnimplementedSeaweedServer struct {
- }
- func (UnimplementedSeaweedServer) SendHeartbeat(Seaweed_SendHeartbeatServer) error {
- return status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented")
- }
- func (UnimplementedSeaweedServer) KeepConnected(Seaweed_KeepConnectedServer) error {
- return status.Errorf(codes.Unimplemented, "method KeepConnected not implemented")
- }
- func (UnimplementedSeaweedServer) LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LookupVolume not implemented")
- }
- func (UnimplementedSeaweedServer) Assign(context.Context, *AssignRequest) (*AssignResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Assign not implemented")
- }
- func (UnimplementedSeaweedServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Statistics not implemented")
- }
- func (UnimplementedSeaweedServer) CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CollectionList not implemented")
- }
- func (UnimplementedSeaweedServer) CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CollectionDelete not implemented")
- }
- func (UnimplementedSeaweedServer) VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method VolumeList not implemented")
- }
- func (UnimplementedSeaweedServer) LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LookupEcVolume not implemented")
- }
- func (UnimplementedSeaweedServer) VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method VacuumVolume not implemented")
- }
- func (UnimplementedSeaweedServer) DisableVacuum(context.Context, *DisableVacuumRequest) (*DisableVacuumResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DisableVacuum not implemented")
- }
- func (UnimplementedSeaweedServer) EnableVacuum(context.Context, *EnableVacuumRequest) (*EnableVacuumResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method EnableVacuum not implemented")
- }
- func (UnimplementedSeaweedServer) VolumeMarkReadonly(context.Context, *VolumeMarkReadonlyRequest) (*VolumeMarkReadonlyResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method VolumeMarkReadonly not implemented")
- }
- func (UnimplementedSeaweedServer) GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetMasterConfiguration not implemented")
- }
- func (UnimplementedSeaweedServer) ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListClusterNodes not implemented")
- }
- func (UnimplementedSeaweedServer) LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LeaseAdminToken not implemented")
- }
- func (UnimplementedSeaweedServer) ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ReleaseAdminToken not implemented")
- }
- func (UnimplementedSeaweedServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
- }
- func (UnimplementedSeaweedServer) RaftListClusterServers(context.Context, *RaftListClusterServersRequest) (*RaftListClusterServersResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RaftListClusterServers not implemented")
- }
- func (UnimplementedSeaweedServer) RaftAddServer(context.Context, *RaftAddServerRequest) (*RaftAddServerResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RaftAddServer not implemented")
- }
- func (UnimplementedSeaweedServer) RaftRemoveServer(context.Context, *RaftRemoveServerRequest) (*RaftRemoveServerResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RaftRemoveServer not implemented")
- }
- func (UnimplementedSeaweedServer) mustEmbedUnimplementedSeaweedServer() {}
- // UnsafeSeaweedServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to SeaweedServer will
- // result in compilation errors.
- type UnsafeSeaweedServer interface {
- mustEmbedUnimplementedSeaweedServer()
- }
- func RegisterSeaweedServer(s grpc.ServiceRegistrar, 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
- }
- func _Seaweed_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(SeaweedServer).KeepConnected(&seaweedKeepConnectedServer{stream})
- }
- type Seaweed_KeepConnectedServer interface {
- Send(*KeepConnectedResponse) error
- Recv() (*KeepConnectedRequest, error)
- grpc.ServerStream
- }
- type seaweedKeepConnectedServer struct {
- grpc.ServerStream
- }
- func (x *seaweedKeepConnectedServer) Send(m *KeepConnectedResponse) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *seaweedKeepConnectedServer) Recv() (*KeepConnectedRequest, error) {
- m := new(KeepConnectedRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- func _Seaweed_LookupVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LookupVolumeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).LookupVolume(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/LookupVolume",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).LookupVolume(ctx, req.(*LookupVolumeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_Assign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AssignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).Assign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/Assign",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).Assign(ctx, req.(*AssignRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_Statistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(StatisticsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).Statistics(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/Statistics",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).Statistics(ctx, req.(*StatisticsRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_CollectionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CollectionListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).CollectionList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/CollectionList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).CollectionList(ctx, req.(*CollectionListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_CollectionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CollectionDeleteRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).CollectionDelete(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/CollectionDelete",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).CollectionDelete(ctx, req.(*CollectionDeleteRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_VolumeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VolumeListRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).VolumeList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/VolumeList",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).VolumeList(ctx, req.(*VolumeListRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_LookupEcVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LookupEcVolumeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).LookupEcVolume(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/LookupEcVolume",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).LookupEcVolume(ctx, req.(*LookupEcVolumeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_VacuumVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VacuumVolumeRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).VacuumVolume(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/VacuumVolume",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).VacuumVolume(ctx, req.(*VacuumVolumeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_DisableVacuum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DisableVacuumRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).DisableVacuum(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/DisableVacuum",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).DisableVacuum(ctx, req.(*DisableVacuumRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_EnableVacuum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(EnableVacuumRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).EnableVacuum(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/EnableVacuum",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).EnableVacuum(ctx, req.(*EnableVacuumRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_VolumeMarkReadonly_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(VolumeMarkReadonlyRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).VolumeMarkReadonly(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/VolumeMarkReadonly",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).VolumeMarkReadonly(ctx, req.(*VolumeMarkReadonlyRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_GetMasterConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetMasterConfigurationRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).GetMasterConfiguration(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/GetMasterConfiguration",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).GetMasterConfiguration(ctx, req.(*GetMasterConfigurationRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_ListClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListClusterNodesRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).ListClusterNodes(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/ListClusterNodes",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).ListClusterNodes(ctx, req.(*ListClusterNodesRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_LeaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LeaseAdminTokenRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).LeaseAdminToken(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/LeaseAdminToken",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).LeaseAdminToken(ctx, req.(*LeaseAdminTokenRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_ReleaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ReleaseAdminTokenRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).ReleaseAdminToken(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/ReleaseAdminToken",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).ReleaseAdminToken(ctx, req.(*ReleaseAdminTokenRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(PingRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).Ping(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/Ping",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).Ping(ctx, req.(*PingRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_RaftListClusterServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RaftListClusterServersRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).RaftListClusterServers(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/RaftListClusterServers",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).RaftListClusterServers(ctx, req.(*RaftListClusterServersRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_RaftAddServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RaftAddServerRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).RaftAddServer(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/RaftAddServer",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).RaftAddServer(ctx, req.(*RaftAddServerRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Seaweed_RaftRemoveServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RaftRemoveServerRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SeaweedServer).RaftRemoveServer(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/master_pb.Seaweed/RaftRemoveServer",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SeaweedServer).RaftRemoveServer(ctx, req.(*RaftRemoveServerRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Seaweed_ServiceDesc is the grpc.ServiceDesc for Seaweed service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Seaweed_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "master_pb.Seaweed",
- HandlerType: (*SeaweedServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "LookupVolume",
- Handler: _Seaweed_LookupVolume_Handler,
- },
- {
- MethodName: "Assign",
- Handler: _Seaweed_Assign_Handler,
- },
- {
- MethodName: "Statistics",
- Handler: _Seaweed_Statistics_Handler,
- },
- {
- MethodName: "CollectionList",
- Handler: _Seaweed_CollectionList_Handler,
- },
- {
- MethodName: "CollectionDelete",
- Handler: _Seaweed_CollectionDelete_Handler,
- },
- {
- MethodName: "VolumeList",
- Handler: _Seaweed_VolumeList_Handler,
- },
- {
- MethodName: "LookupEcVolume",
- Handler: _Seaweed_LookupEcVolume_Handler,
- },
- {
- MethodName: "VacuumVolume",
- Handler: _Seaweed_VacuumVolume_Handler,
- },
- {
- MethodName: "DisableVacuum",
- Handler: _Seaweed_DisableVacuum_Handler,
- },
- {
- MethodName: "EnableVacuum",
- Handler: _Seaweed_EnableVacuum_Handler,
- },
- {
- MethodName: "VolumeMarkReadonly",
- Handler: _Seaweed_VolumeMarkReadonly_Handler,
- },
- {
- MethodName: "GetMasterConfiguration",
- Handler: _Seaweed_GetMasterConfiguration_Handler,
- },
- {
- MethodName: "ListClusterNodes",
- Handler: _Seaweed_ListClusterNodes_Handler,
- },
- {
- MethodName: "LeaseAdminToken",
- Handler: _Seaweed_LeaseAdminToken_Handler,
- },
- {
- MethodName: "ReleaseAdminToken",
- Handler: _Seaweed_ReleaseAdminToken_Handler,
- },
- {
- MethodName: "Ping",
- Handler: _Seaweed_Ping_Handler,
- },
- {
- MethodName: "RaftListClusterServers",
- Handler: _Seaweed_RaftListClusterServers_Handler,
- },
- {
- MethodName: "RaftAddServer",
- Handler: _Seaweed_RaftAddServer_Handler,
- },
- {
- MethodName: "RaftRemoveServer",
- Handler: _Seaweed_RaftRemoveServer_Handler,
- },
- },
- Streams: []grpc.StreamDesc{
- {
- StreamName: "SendHeartbeat",
- Handler: _Seaweed_SendHeartbeat_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "KeepConnected",
- Handler: _Seaweed_KeepConnected_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "master.proto",
- }
|