server

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grpc added in v0.3.0

type Grpc struct {
	Name   string
	Config GrpcConfig
	// contains filtered or unexported fields
}

func NewGrpc added in v0.3.0

func NewGrpc(name string, cfg GrpcConfig) *Grpc

func (*Grpc) Init added in v0.3.0

func (t *Grpc) Init(app interfaces.IEngine) error

func (*Grpc) RegisterService added in v0.3.0

func (t *Grpc) RegisterService(desc *grpc.ServiceDesc, impl any)

func (*Grpc) Start added in v0.3.0

func (t *Grpc) Start() error

func (*Grpc) Stop added in v0.3.0

func (t *Grpc) Stop() error

func (*Grpc) String added in v0.3.0

func (t *Grpc) String() string

type GrpcConfig added in v0.3.0

type GrpcConfig struct {
	Port string `yaml:"port"`
}

type Http

type Http struct {
	Name   string
	Config HttpConfig
	// contains filtered or unexported fields
}

func NewHttp added in v0.0.9

func NewHttp(name string, cfg HttpConfig) *Http

func (*Http) Init

func (t *Http) Init(app interfaces.IEngine) error

func (*Http) PushRoute added in v0.0.2

func (t *Http) PushRoute(method string, path string, handler interfaces.RouteFunc, middlewares []string)

func (*Http) ServeHTTP

func (t *Http) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Http) Start added in v0.0.3

func (t *Http) Start() error

func (*Http) Stop

func (t *Http) Stop() error

func (*Http) String

func (t *Http) String() string

type HttpConfig added in v0.0.9

type HttpConfig struct {
	Port string `yaml:"port"`

	CookieDomain   string `yaml:"cookie_domain"`
	CookieSameSite string `yaml:"cookie_same_site"`
	CookieHttpOnly bool   `yaml:"cookie_http_only"`
	CookieSecure   bool   `yaml:"cookie_secure"`

	BaseMiddleware []string `yaml:"base_middleware"`
}

type Kafka added in v0.0.9

type Kafka struct {
	Name string

	Config KafkaConfig
	// contains filtered or unexported fields
}

func NewKafka added in v0.0.9

func NewKafka(name string, cfg KafkaConfig) *Kafka

func (*Kafka) Handle added in v0.0.9

func (t *Kafka) Handle(msg *kafka.Message)

func (*Kafka) Init added in v0.0.9

func (t *Kafka) Init(app interfaces.IEngine) error

func (*Kafka) PushRoute added in v0.0.9

func (t *Kafka) PushRoute(method string, path string, handler interfaces.RouteFunc, middlewares []string)

func (*Kafka) Start added in v0.0.9

func (t *Kafka) Start() error

func (*Kafka) Stop added in v0.0.9

func (t *Kafka) Stop() error

func (*Kafka) String added in v0.0.9

func (t *Kafka) String() string

type KafkaConfig added in v0.0.9

type KafkaConfig struct {
	Hosts             string   `yaml:"hosts"`
	GroupId           string   `yaml:"group_id"`
	User              string   `yaml:"user"`
	Password          string   `yaml:"password"`
	Topics            []string `yaml:"topics"`
	LimitMessageCount int64    `yaml:"limit_message_count"`
	BaseMiddleware    []string `yaml:"base_middleware"`
}

type Mock

type Mock struct {
	Name string
}

func (*Mock) Init

func (t *Mock) Init(_ interfaces.IEngine) error

func (*Mock) Start added in v0.0.3

func (t *Mock) Start() error

func (*Mock) Stop

func (t *Mock) Stop() error

func (*Mock) String

func (t *Mock) String() string

type Router

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

func NewRouter

func NewRouter(app interfaces.IEngine) *Router

func (*Router) Find

func (t *Router) Find(method string, path string) (interfaces.RouteFunc, map[string]string)

func (*Router) PushRoute

func (t *Router) PushRoute(method string, path string, handler interfaces.RouteFunc, middlewares []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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