handler

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package handler provides http handlers

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultMaxRecvSize int64 = 1024 * 1024 * 100 // 100Mb
)

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handle return gin.Context
	Handle(ctx *gin.Context)
	// String the name of handler
	String() string
}

Handler represents HTTP handler that manages a request

type Option

type Option func(o *Options)

func WithClient

func WithClient(c client.Client) Option

func WithMaxRecvSize

func WithMaxRecvSize(size int64) Option

WithMaxRecvSize specifies max body size

func WithMetadata added in v1.6.12

func WithMetadata(md map[string]string) Option

WithMetadata specifies metadata

func WithNamespace

func WithNamespace(s string) Option

WithNamespace specifies the namespace for the handler

func WithRouter

func WithRouter(r router.Router) Option

WithRouter specifies a router to be used by the handler

func WithSelectStrategy added in v1.4.9

func WithSelectStrategy(strategy selector.Strategy) Option

WithSelectStrategy specifies client selector strategy

type Options

type Options struct {
	MaxRecvSize int64
	Namespace   string
	Router      router.Router
	Client      client.Client
	Strategy    selector.Strategy
	Metadata    map[string]string
}

func NewOptions

func NewOptions(opts ...Option) Options

NewOptions fills in the blanks

Directories

Path Synopsis
Package api provides an http-rpc handler which provides the entire http request over rpc
Package api provides an http-rpc handler which provides the entire http request over rpc
Package event provides a handler which publishes an event
Package event provides a handler which publishes an event
Package http is a http reverse proxy handler
Package http is a http reverse proxy handler
Package rpc is a vine rpc handler.
Package rpc is a vine rpc handler.
Package web contains the web handler including websocket support
Package web contains the web handler including websocket support

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL