Documentation ¶
Index ¶
- Constants
- func MustNew(opts ...Option) *bundle
- func New(opts ...Option) (*bundle, 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 ronykit.IncomingRPCFactory, out ronykit.OutgoingRPCFactory) Option
- func WithLogger(l ronykit.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 ronykit.IncomingRPCFactory, out ronykit.OutgoingRPCFactory) Option
func WithLogger ¶
func WithPredicateKey ¶
func WithServerName ¶
func WithWebsocketEndpoint ¶
type Selector ¶
type Selector struct { Method string Path string Predicate string Decoder DecoderFunc Encoding ronykit.Encoding }
Selector implements ronykit.RouteSelector and also ronykit.RPCRouteSelector and ronykit.RESTRouteSelector
func (Selector) GetEncoding ¶ added in v0.6.0
func (Selector) GetPredicate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.