kubernetes/vendor/github.com/containerd/ttrpc/server.go

type Server

func NewServer(opts ...ServerOpt) (*Server, error) {}

// Register registers a map of methods to method handlers
// TODO: Remove in 2.0, does not support streams
func (s *Server) Register(name string, methods map[string]Method) {}

func (s *Server) RegisterService(name string, desc *ServiceDesc) {}

func (s *Server) Serve(ctx context.Context, l net.Listener) error {}

func (s *Server) Shutdown(ctx context.Context) error {}

// Close the server without waiting for active connections.
func (s *Server) Close() error {}

func (s *Server) addListener(l net.Listener) {}

func (s *Server) closeListener(l net.Listener) error {}

func (s *Server) closeListenerLocked(l net.Listener) error {}

func (s *Server) closeListeners() error {}

func (s *Server) addConnection(c *serverConn) error {}

func (s *Server) delConnection(c *serverConn) {}

func (s *Server) countConnection() int {}

func (s *Server) closeIdleConns() {}

type connState

const connStateActive

const connStateIdle

const connStateClosed

func (cs connState) String() string {}

func (s *Server) newConn(conn net.Conn, handshake interface{}

type serverConn

func (c *serverConn) getState() (connState, bool) {}

func (c *serverConn) setState(newstate connState) {}

func (c *serverConn) close() error {}

func (c *serverConn) run(sctx context.Context) {}

var noopFunc

func getRequestContext(ctx context.Context, req *Request) (retCtx context.Context, cancel func()) {}