atlantis

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 8 Imported by: 0

README

Jas.Atlantis

micro framework

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxTimeout

func CtxTimeout(sec time.Duration) (context.Context, context.CancelFunc)

CtxTimeout : 设置请求超时时间

Types

type Client

type Client struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

Client : .

func (*Client) Close

func (c *Client) Close()

Close : 关闭客户端连接

func (*Client) NewConn

func (c *Client) NewConn(cfg *config.Config, dos ...grpc.DialOption) *grpc.ClientConn

NewConn : 和服务端建立连接

type Engine

type Engine struct {
	Service
	// contains filtered or unexported fields
}

Engine : 服务引擎

func NewService

func NewService() *Engine

NewService : 新建服务实例

func (*Engine) Run

func (e *Engine) Run()

Run : 运行服务

func (*Engine) SetConfig

func (e *Engine) SetConfig(cfg *config.Config)

type Service

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

func (*Service) Add

func (s *Service) Add(svc Svc)

func (*Service) Adds

func (s *Service) Adds(svc ...Svc)

type Svc

type Svc func(*grpc.Server)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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