zoo

package module
v0.0.0-...-ee57bd3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 20 Imported by: 4

README

zoo

A Go Development Kit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(opts ...Option) *App

func (*App) GetHttpServer

func (a *App) GetHttpServer() *httpserver.Server

func (*App) GetRpcServer

func (a *App) GetRpcServer() *server.Server

func (*App) Run

func (a *App) Run() error

type Option

type Option func(*Options)

func AfterStart

func AfterStart(f func() error) Option

func AfterStop

func AfterStop(f func() error) Option

func BeforeStart

func BeforeStart(f func() error) Option

func BeforeStop

func BeforeStop(f func() error) Option

func InitHttpServer

func InitHttpServer(f httpserver.InitHttpServerFunc) Option

func InitRpcServer

func InitRpcServer(f server.InitRpcServerFunc) Option

type Options

type Options struct {
	InitRpcServer  server.InitRpcServerFunc
	InitHttpServer httpserver.InitHttpServerFunc
	BeforeStart    []func() error
	AfterStart     []func() error
	BeforeStop     []func() error
	AfterStop      []func() error
}

Jump to

Keyboard shortcuts

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