server

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 15 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 {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts opt.Option) *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) RegisterChannelHandler

func (s *Server) RegisterChannelHandler(method string, rs handler.ChannelHandler)

func (*Server) RegisterHandler

func (s *Server) RegisterHandler(method string, rr handler.Handler)

func (*Server) RegisterStreamHandler

func (s *Server) RegisterStreamHandler(method string, rs handler.StreamHandler)

func (*Server) Run

func (s *Server) Run()

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

roc don't suggest method like GET,because you can use other http web framework to build a restful api with not by roc roc support POST,DELETE,PUT,GET,OPTIONS for compatible rrRouter ,witch request response way because ServeHTTP api need support json or proto data protocol suggest just use POST,PUT for your roc service

Jump to

Keyboard shortcuts

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