gorush: github.com/appleboy/gorush/rpc Index | Files | Directories

package rpc

import "github.com/appleboy/gorush/rpc"

Index

Package Files

client_grpc_health.go health.go server.go

func RunGRPCServer Uses

func RunGRPCServer() error

RunGRPCServer run gorush grpc server

type Health Uses

type Health interface {
    // Check returns if server is healthy or not
    Check(c context.Context) (bool, error)
}

Health defines a health-check connection.

func NewGrpcHealthClient Uses

func NewGrpcHealthClient(conn *grpc.ClientConn) Health

NewGrpcHealthClient returns a new grpc Client.

type Server Uses

type Server struct {
    // contains filtered or unexported fields
}

Server is used to implement gorush grpc server.

func NewServer Uses

func NewServer() *Server

NewServer returns a new Server.

func (*Server) Check Uses

func (s *Server) Check(ctx context.Context, in *proto.HealthCheckRequest) (*proto.HealthCheckResponse, error)

Check implements `service Health`.

func (*Server) Send Uses

func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*proto.NotificationReply, error)

Send implements helloworld.GreeterServer

Directories

PathSynopsis
proto

Package rpc imports 10 packages (graph) and is imported by 6 packages. Updated 2019-06-27. Refresh now. Tools for package owners.