server

package
v0.0.0-...-e03dcb5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server echo server side implement struct

func (*Server) Close

func (s *Server) Close() (err error)

Close server

func (*Server) Listen

func (s *Server) Listen(
	addr string,
	certPath string,
	keyPath string,
) (err error)

Listen a http/grpc server

func (*Server) Send

func (s *Server) Send(ctx context.Context, ping *pb.Ping) (*pb.Pong, error)

Send return pong

func (*Server) Subscribe

func (s *Server) Subscribe(ping *pb.Ping, stream pb.Echo_SubscribeServer) (err error)

Subscribe response message for every second

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL