Documentation ¶
Index ¶
- type Config
- type Option
- type Server
- func (s *Server) AddMiddleware(middleware func(http.Handler) http.Handler)
- func (s *Server) Handle(pattern string, handler http.Handler)
- func (s *Server) RegisterService(t TwirpServer)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) WaitForAddress(ctx context.Context) (net.Addr, error)
- type TwirpServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithConfig ¶
func WithServerAddress ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddMiddleware ¶
TODO: allow setting a matcher on middleware?
func (*Server) RegisterService ¶
func (s *Server) RegisterService(t TwirpServer)
RegisterService registers twirp service
type TwirpServer ¶
type TwirpServer interface { reflection.TwirpServer http.Handler }
Click to show internal directories.
Click to hide internal directories.