graceful

package
Version: v0.0.0-...-6b5ae49 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteResult

type CompleteResult struct {
	Success bool
	Error   error
}

type IApplication

type IApplication interface {
	SetName(value string)
	GetName() string

	SetCmd(value string)
	GetCmd() string

	SetWorkPath(value string)
	GetWorkPath() string

	SetTimeOut(value time.Duration)
	GetTimeOut() time.Duration

	SetContext(ctx context.Context)
	GetContext() context.Context

	Run(args ...string) error
}

func NewIApplication

func NewIApplication(opts ...Option) IApplication

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCmd

func WithCmd(cmd string) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithName

func WithName(name string) Option

func WithTimeOut

func WithTimeOut(timeout time.Duration) Option

func WithWorkPath

func WithWorkPath(wPath string) Option

type Server

type Server struct {
	Name   string
	Ip     string
	Port   int
	Engine *gin.Engine
}

func New

func New() *Server

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL