client

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 4 Imported by: 0

README

客户端规范

  • 每个客户端至少包含以下4个文件:
    • client.go: Interface定义,New, Functions
    • doc.go: 包doc.go文件
    • helper.go: 类似于util.go文件
    • model.go: 模型定义文件
    • options.go: 命令行参数定义,需要满足IOptions接口
  • client.go:
    • GetClient: 获取global impl实例
    • 使用sync.Once,确保只实例化一次

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserAgent  = "onex"
	Debug      = false
	RetryCount = 3
	Timeout    = 30 * time.Second
)

Define global options for all clients.

Functions

func AddFlags

func AddFlags(fs *pflag.FlagSet)

func IsDiscoveryEndpoint

func IsDiscoveryEndpoint(server string) bool

IsDiscoveryEndpoint used to determine if the given endpoint is a service discovery endpoint.

func NewRequest

func NewRequest(url string) *resty.Request

Types

This section is empty.

Directories

Path Synopsis
aggregate
Package store defines the storage interface for onex-gateway.
Package store defines the storage interface for onex-gateway.
Package usercenter provide methods used to access usercenter service.
Package usercenter provide methods used to access usercenter service.
Package usercenter provide methods used to access usercenter service.
Package usercenter provide methods used to access usercenter service.

Jump to

Keyboard shortcuts

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