Documentation ¶
Index ¶
- Constants
- func MustNew(opts ...Option) kit.Gateway
- func New(opts ...Option) (kit.Gateway, error)
- type CORSConfig
- type DecoderFunc
- type Option
- func Listen(addr string) Option
- func WithBufferSize(read, write int) Option
- func WithCORS(cfg CORSConfig) Option
- func WithCustomRPC(in kit.IncomingRPCFactory, out kit.OutgoingRPCFactory) Option
- func WithLogger(l kit.Logger) Option
- func WithPredicateKey(key string) Option
- func WithServerName(name string) Option
- func WithWebsocketEndpoint(endpoint string) Option
- type Params
- type Selector
Constants ¶
View Source
const ( MethodGet = "GET" // RFC 7231, 4.3.1 MethodHead = "HEAD" // RFC 7231, 4.3.2 MethodPost = "POST" // RFC 7231, 4.3.3 MethodPut = "PUT" // RFC 7231, 4.3.4 MethodPatch = "PATCH" // RFC 5789 MethodDelete = "DELETE" // RFC 7231, 4.3.5 MethodConnect = "CONNECT" // RFC 7231, 4.3.6 MethodOptions = "OPTIONS" // RFC 7231, 4.3.7 MethodTrace = "TRACE" // RFC 7231, 4.3.8 MethodWildcard = "*" )
HTTP methods were copied from net/http.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CORSConfig ¶
type Option ¶
type Option func(b *bundle)
func WithBufferSize ¶
func WithCORS ¶
func WithCORS(cfg CORSConfig) Option
func WithCustomRPC ¶
func WithCustomRPC(in kit.IncomingRPCFactory, out kit.OutgoingRPCFactory) Option
func WithLogger ¶
func WithPredicateKey ¶
func WithServerName ¶
func WithWebsocketEndpoint ¶
type Selector ¶
type Selector struct { Method string Path string Predicate string Decoder DecoderFunc Encoding kit.Encoding }
Selector implements kit.RouteSelector and also kit.RPCRouteSelector and kit.RESTRouteSelector
func (Selector) GetEncoding ¶
func (Selector) GetPredicate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.