refactor(rcp): move health interface to core package
This commit is contained in:
parent
4be2c8036d
commit
e13a05bc08
|
@ -1,8 +1,6 @@
|
|||
package rpc
|
||||
package core
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
import "context"
|
||||
|
||||
// Health defines a health-check connection.
|
||||
type Health interface {
|
|
@ -3,6 +3,7 @@ package rpc
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/appleboy/gorush/core"
|
||||
"github.com/appleboy/gorush/rpc/proto"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
@ -19,7 +20,7 @@ type healthClient struct {
|
|||
}
|
||||
|
||||
// NewGrpcHealthClient returns a new grpc Client.
|
||||
func NewGrpcHealthClient(conn *grpc.ClientConn) Health {
|
||||
func NewGrpcHealthClient(conn *grpc.ClientConn) core.Health {
|
||||
client := new(healthClient)
|
||||
client.client = proto.NewHealthClient(conn)
|
||||
client.conn = conn
|
||||
|
|
Loading…
Reference in New Issue