Documentation ¶
Overview ¶
Package routers //
Package routers //
Package routers //
Index ¶
- func NewAPIRouter(opt *APIOptions) *chi.Mux
- func NewAdminRouter(conf config.AgentConfig) http.Handler
- func NewDefaultAPIRouter(optlyCache optimizely.Cache, conf config.APIConfig, ...) http.Handler
- func NewWebhookRouter(optlyCache optimizely.Cache, conf config.WebhookConfig) *chi.Mux
- func WithAPIRouter(opt *APIOptions, r chi.Router)
- type APIOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPIRouter ¶
func NewAPIRouter(opt *APIOptions) *chi.Mux
NewAPIRouter returns HTTP API router backed by an optimizely.Cache implementation
func NewAdminRouter ¶
func NewAdminRouter(conf config.AgentConfig) http.Handler
NewAdminRouter returns HTTP admin router
func NewDefaultAPIRouter ¶
func NewDefaultAPIRouter(optlyCache optimizely.Cache, conf config.APIConfig, metricsRegistry *metrics.Registry) http.Handler
NewDefaultAPIRouter creates a new router with the default backing optimizely.Cache
func NewWebhookRouter ¶
func NewWebhookRouter(optlyCache optimizely.Cache, conf config.WebhookConfig) *chi.Mux
NewWebhookRouter returns HTTP API router
func WithAPIRouter ¶ added in v0.14.0
func WithAPIRouter(opt *APIOptions, r chi.Router)
WithAPIRouter appends routes and middleware to the given router. See https://godoc.org/github.com/go-chi/chi#Mux.Group for usage
Types ¶
type APIOptions ¶
type APIOptions struct {
// contains filtered or unexported fields
}
APIOptions defines the configuration parameters for Router.
Click to show internal directories.
Click to hide internal directories.