ApolloCLI

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

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

README

ApolloCLI

apollo-cli 基于UNIX-Domain Socket通信的客户端,用于和Apollo服务通信

Documentation

Overview

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Package ApolloCLI

Index

Constants

View Source
const (
	ApolloCLI  = "ApolloCLI"
	ApolloAddr = "/var/run/Apollo.sock"
	APPRoot    = "/renj.io/app"
	TwigAddr   = "/var/run/OctopusTwig.sock"
	ReadSize   = 1 << 20
)
View Source
const (
	NoEngineAll     = "/api/noengine/all"
	NoEngineStart   = "/api/noengine/x/start"
	NoEngineReStart = "/api/noengine/x/restart"
	NoEngineStop    = "/api/noengine/x/stop"
	NoEnginePause   = "/api/noengine/x/pause"
	NoEngineResume  = "/api/noengine/x/resume"
	NoEngineRemove  = "/api/noengine/x/remove"
	NoEngineStatus  = "/api/noengine/x/status"
	NoEngineRefresh = "/api/noengine/x/refresh"
)
View Source

Variables

View Source
var CLI = grumble.New(&grumble.Config{
	Name:        ApolloCLI,
	Description: msg.Description,
	Flags: func(f *grumble.Flags) {
		f.String("a", "address", ApolloAddr, msg.FlagAddress)
		f.Bool("v", "version", false, msg.FlagVersion)
		f.Bool("s", "skip", false, msg.FlagVersion)
	},
	PromptColor:           color.New(color.FgGreen, color.Bold),
	HelpHeadlineColor:     color.New(color.FgGreen),
	HelpHeadlineUnderline: true,
})

Functions

func ErrPrintf

func ErrPrintf(f string, v ...interface{})

func ErrPrintln

func ErrPrintln(v ...interface{})

func InfoPrintf

func InfoPrintf(f string, v ...interface{})

func InfoPrintln

func InfoPrintln(v ...interface{})

func NoEngineManage

func NoEngineManage(app string, ops string) (interface{}, error)

NoEngineManage 查询全部服务时app为空

func SuccessPrintf

func SuccessPrintf(f string, v ...interface{})

func SuccessPrintln

func SuccessPrintln(v ...interface{})

func TableApps

func TableApps(d interface{}) (*table.Table, error)

TableApps Table表格化输出

Types

type App

type App struct {
	Meta octopus_meta.App `json:"meta"`
}

type NoEnginePort

type NoEnginePort struct {
	HostPort  string `json:"hostPort"`
	InnerPort string `json:"innerPort"`
	Proto     string `json:"proto"` // 默认为tcp
}

type NoEngineTemplate

type NoEngineTemplate struct {
	// 域名默认由nginx.conf文件配置不需要单独写在配置文件中
	ServerDomain string           `json:"serverDomain"` // 缺省域名
	ServerName   string           `json:"serverName"`   // 微服务名称
	Volumes      []NoEngineVolume `json:"volumes"`      // 映射卷
	Ports        []NoEnginePort   `json:"ports"`        // 映射端口 开启随机端口时hostPort为随机生成
}

type NoEngineVolume

type NoEngineVolume struct {
	HostPath  string `json:"hostPath"`
	InnerPath string `json:"innerPath"`
}

Directories

Path Synopsis
Package main
Package main
Package http Apollo的http内置接口
Package http Apollo的http内置接口
Package msg
Package msg

Jump to

Keyboard shortcuts

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