lux

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateListenAddress

func GenerateListenAddress(addr string) func() ListenAddress

func ListenAndServe1

func ListenAndServe1(ctx context.Context, lx *Lux, addr ListenAddress) error

func ListenAndServe1AudoTLS

func ListenAndServe1AudoTLS(addr ...string) func(ctx context.Context, lx *Lux) error

func ListenAndServe1TLS

func ListenAndServe1TLS(ctx context.Context, lx *Lux, addr ListenAddress, certFile, keyFile string) error

func ListenAndServe2

func ListenAndServe2(ctx context.Context, lx *Lux, addr ListenAddress) error

func ListenAndServe2AudoTLS

func ListenAndServe2AudoTLS(addr ...string) func(ctx context.Context, lx *Lux) error

func ListenAndServe2TLS

func ListenAndServe2TLS(ctx context.Context, lx *Lux, addr ListenAddress, certFile, keyFile string) error

func SetIdleTimeout added in v3.1.0

func SetIdleTimeout(l *Lux, duration time.Duration)

func SetJWTConfig added in v3.1.0

func SetJWTConfig(l *Lux, cfg *context.JWTConfig)

func SetLogger added in v3.1.0

func SetLogger(l *Lux, logger *zerolog.Logger)

func SetMaxHeaderBytes added in v3.1.0

func SetMaxHeaderBytes(l *Lux, n int)

func SetReadHeaderTimeout added in v3.1.0

func SetReadHeaderTimeout(l *Lux, duration time.Duration)

func SetReadTimeout added in v3.1.0

func SetReadTimeout(l *Lux, duration time.Duration)

func SetWriteTimeout added in v3.1.0

func SetWriteTimeout(l *Lux, duration time.Duration)

Types

type ListenAddress

type ListenAddress string

type Lux

type Lux struct {
	// contains filtered or unexported fields
}

func New

func New() *Lux

func (*Lux) AddRestController

func (l *Lux) AddRestController(route string, method controller.Method, controller controller.RestController)

func (*Lux) AddSocketController

func (l *Lux) AddSocketController(route string, controller controller.SocketController)

func (*Lux) ListenAndServe1

func (l *Lux) ListenAndServe1(ctx ctx.Context, addr string) error

func (*Lux) ListenAndServe1AutoTLS

func (l *Lux) ListenAndServe1AutoTLS(ctx ctx.Context, addr []string) error

func (*Lux) ListenAndServe1TLS

func (l *Lux) ListenAndServe1TLS(ctx ctx.Context, addr string, certFile string, keyFile string) error

func (*Lux) ListenAndServe2

func (l *Lux) ListenAndServe2(ctx ctx.Context, addr string) error

func (*Lux) ListenAndServe2AutoTLS

func (l *Lux) ListenAndServe2AutoTLS(ctx ctx.Context, addr []string) error

func (*Lux) ListenAndServe2TLS

func (l *Lux) ListenAndServe2TLS(ctx ctx.Context, addr string, certFile string, keyFile string) error

func (*Lux) ServeHTTP

func (l *Lux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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