You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
854 B
39 lines
854 B
package hrpc |
|
|
|
import ( |
|
"context" |
|
|
|
"github.com/golang/protobuf/proto" |
|
"github.com/tsuna/gohbase/pb" |
|
) |
|
|
|
// 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{} |
|
}
|
|
|