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