lava

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation interface {
	Name() string
}

Annotation is used to attach arbitrary metadata to the schema objects

type Annotations

type Annotations = []Annotation

type Close

type Close interface {
	Close()
}

type GrpcGatewayRouter

type GrpcGatewayRouter interface {
	GrpcRouter
	RegisterGateway(ctx context.Context, mux *runtime.ServeMux, conn grpc.ClientConnInterface) error
}

type GrpcProxy added in v0.2.21

type GrpcProxy interface {
	GrpcRouter
	Proxy() ProxyCfg
}

type GrpcRouter

type GrpcRouter interface {
	Middlewares() []Middleware
	ServiceDesc() *grpc.ServiceDesc
}

type HandlerFunc

type HandlerFunc func(ctx context.Context, req Request) (Response, error)

type HttpRouter

type HttpRouter interface {
	Middlewares() []Middleware
	Router(router fiber.Router)
	Prefix() string
}

type Init

type Init interface {
	Init()
}

type Initializer

type Initializer interface {
	Initialize()
}

Initializer ...

type InnerServer

type InnerServer struct {
	grpc.ClientConnInterface
}

type Middleware

type Middleware interface {
	Middleware(next HandlerFunc) HandlerFunc
	String() string
}

func Chain

func Chain(m ...Middleware) Middleware

type MiddlewareWrap

type MiddlewareWrap struct {
	Next func(next HandlerFunc) HandlerFunc
	Name string
}

func (MiddlewareWrap) Middleware

func (m MiddlewareWrap) Middleware(next HandlerFunc) HandlerFunc

func (MiddlewareWrap) String

func (m MiddlewareWrap) String() string

type Middlewares

type Middlewares []Middleware

type ProxyCfg added in v0.2.21

type ProxyCfg struct {
	// Name service name
	Name string `yaml:"name"`
	// Addr service address
	Addr string `yaml:"addr"`
	// Resolver service resolver, default direct
	Resolver string `yaml:"resolver"`
}

type Request

type Request interface {
	// Client server or client
	Client() bool

	// Kind [http|grpc...]
	Kind() string

	// Stream Indicates whether it's a stream
	Stream() bool

	// Service name requested
	Service() string

	// Operation requested
	Operation() string

	// Endpoint requested
	Endpoint() string

	// ContentType Content type provided
	ContentType() string

	// Header of the request
	Header() *RequestHeader

	// Payload is the decoded value
	Payload() interface{}
}

Request is a synchronous request interface

type RequestHeader

type RequestHeader = fasthttp.RequestHeader

type Response

type Response interface {
	Header() *ResponseHeader
	Payload() interface{}
	Stream() bool
}

Response is the response writer for un encoded messages

type ResponseHeader

type ResponseHeader = fasthttp.ResponseHeader

type Server

type Server interface {
	Serve(context.Context, net.Listener) error
}

Server provides an interface for starting and stopping the server.

type Service

type Service interface {
	Start()
	Stop()
	Run()
}

type Validator

type Validator interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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