forked from tsuna/gohbase
/
status.go
39 lines (32 loc) · 862 Bytes
/
status.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package hrpc
import (
"context"
"github.com/akashsharma95/gohbase/pb"
"google.golang.org/protobuf/proto"
)
// ClusterStatus to represent a cluster status request
type ClusterStatus struct {
base
}
// NewClusterStatus creates a new ClusterStatusStruct with default fields
func NewClusterStatus() *ClusterStatus {
return &ClusterStatus{
base{
ctx: context.Background(),
table: []byte{},
resultch: make(chan RPCResult, 1),
},
}
}
// Name returns the name of the rpc function
func (c *ClusterStatus) Name() string {
return "GetClusterStatus"
}
// ToProto returns the Protobuf message to be sent
func (c *ClusterStatus) ToProto() proto.Message {
return &pb.GetClusterStatusRequest{}
}
// NewResponse returns the empty protobuf response
func (c *ClusterStatus) NewResponse() proto.Message {
return &pb.GetClusterStatusResponse{}
}