vserver

package
v0.0.0-...-9193f8e Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcServer

func NewGrpcServer() *grpc.Server

Types

type EchoServer

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

func (*EchoServer) GetEchoServer

func (e *EchoServer) GetEchoServer() *echo.Echo

func (*EchoServer) Register

func (e *EchoServer) Register(opts ...ServerOptions) Server

func (*EchoServer) Shutdown

func (e *EchoServer) Shutdown(ctx context.Context) error

func (*EchoServer) Start

func (e *EchoServer) Start(ctx context.Context) error

type EchoServerConfig

type EchoServerConfig struct {
	Name      string `json:"name" yaml:"name"`
	Addr      string `json:"addr" yaml:"addr"`
	Env       string `json:"env" yaml:"env"`
	WithStack bool   `json:"withStack" yaml:"withStack"`
}

type GinServer

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

func (*GinServer) GetGinServer

func (g *GinServer) GetGinServer() *http.Server

func (*GinServer) Register

func (g *GinServer) Register(opts ...ServerOptions) Server

func (*GinServer) Shutdown

func (g *GinServer) Shutdown(ctx context.Context) error

func (*GinServer) Start

func (g *GinServer) Start(ctx context.Context) error

type GinServerConfig

type GinServerConfig struct {
	Name string `json:"name" yaml:"name"`
	Addr string `json:"addr" yaml:"addr"`
}

type Server

type Server interface {
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
	Register(opts ...ServerOptions) Server
}

func NewEchoServer

func NewEchoServer(ctx context.Context, cfg *EchoServerConfig, opts ...ServerOptions) (Server, error)

func NewGinServer

func NewGinServer(ctx context.Context, cfg GinServerConfig, opts ...ServerOptions) (Server, error)

type ServerOptions

type ServerOptions = func(server Server) Server

Jump to

Keyboard shortcuts

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