Documentation ¶
Index ¶
- func Client[T any](nf gRPCClient[T], hc connect.HTTPClient, addr string, ...) T
- type ApplyToServer
- func WithAddr(addr string) ApplyToServer
- func WithCORS(fn func(h http.Handler) http.Handler) ApplyToServer
- func WithCert(cert, key string) ApplyToServer
- func WithCertFile(certFile, keyFile string) ApplyToServer
- func WithCertFromCheck(env string, path ...string) ApplyToServer
- func WithCertPEM(cert, key []byte) ApplyToServer
- func WithH2C(h2c *http2.Server) ApplyToServer
- func WithHTTPServer(s *http.Server) ApplyToServer
- func WithHandle(h HttpHandle) ApplyToServer
- func WithHealthAndMetrics(addr, _path string) ApplyToServer
- type Health
- type HttpHandle
- type Server
- func (s *Server) Close() error
- func (s *Server) Handle(pattern string, handler http.Handler)
- func (s *Server) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (x Server) IsLive() bool
- func (x Server) IsReady() bool
- func (x Server) Register(h HttpHandle)
- func (s *Server) Run() error
- func (s *Server) RunH2C() error
- func (x Server) SetLive()
- func (x Server) SetNoLive(e string)
- func (x Server) SetNoReady(e string)
- func (x Server) SetReady()
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client[T any](nf gRPCClient[T], hc connect.HTTPClient, addr string, opts ...connect.ClientOption) T
Types ¶
type ApplyToServer ¶
type ApplyToServer func(*ServerOption)
func WithAddr ¶
func WithAddr(addr string) ApplyToServer
func WithCert ¶
func WithCert(cert, key string) ApplyToServer
func WithCertFile ¶
func WithCertFile(certFile, keyFile string) ApplyToServer
func WithCertFromCheck ¶
func WithCertFromCheck(env string, path ...string) ApplyToServer
func WithCertPEM ¶
func WithCertPEM(cert, key []byte) ApplyToServer
func WithH2C ¶
func WithH2C(h2c *http2.Server) ApplyToServer
func WithHTTPServer ¶
func WithHTTPServer(s *http.Server) ApplyToServer
func WithHandle ¶
func WithHandle(h HttpHandle) ApplyToServer
func WithHealthAndMetrics ¶
func WithHealthAndMetrics(addr, _path string) ApplyToServer
type HttpHandle ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opt ...ApplyToServer) (*Server, error)
func (*Server) HandleFunc ¶
func (Server) Register ¶
func (x Server) Register(h HttpHandle)
func (Server) SetNoReady ¶
func (x Server) SetNoReady(e string)
type ServerOption ¶
type ServerOption struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.