-
Notifications
You must be signed in to change notification settings - Fork 212
/
status.go
44 lines (36 loc) · 978 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
40
41
42
43
44
package hrpc
import (
"context"
"github.com/tsuna/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"
}
// Description returns the description of this RPC call.
func (c *ClusterStatus) Description() string {
return c.Name()
}
// 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{}
}