package
2.4.4+incompatible
Repository: https://github.com/laincloud/lainlet.git
Documentation: pkg.go.dev

# README

v2版的API的Data格式统一成了json, 各个API的返回结果的Data的源数据如下, 可使用对应数据结构的xxx.Decode([]byte)函数进行解析

使用这些数据结构需要:

import "github.com/laincloud/lainlet/api/v2"

/v2/configwatcher

type GeneralConfig struct {
	Data map[string]string // data type return by configwatcher
}

/v2/coreinfowatcher

import lainEngine "github.com/laincloud/deployd/engine"

type CoreInfo lainEngine.PodGroupCoreInfo // 这个格式需要参考deployd的代码

type GeneralCoreInfo struct {
	Data map[string]coreinfo.CoreInfo // 真正的Data
}

/v2/localspecquery

type LocalSpec struct {
	Data    []string // 真正的Data
}

/v2/procwatcher

type Pod struct {
	InstanceNo int
	IP         string
	Port       int
	ProcName   string
}

type PodGroup struct {
	Pods []Pod `json:"proc"`
}

type GeneralPodGroup struct {
	Data []PodGroup // 真正的Data
}

/v2/proxywatcher

type Container struct {
	ContainerIp   string `json:"container_ip"`
	ContainerPort int    `json:"container_port"`
}

type ProcInfo struct {
	Containers []Container `json:"containers"`
}

type ProxyData struct {    
	Data map[string]ProcInfo // 真正的data
}

/v2/depends

type ContainerInfo struct {
	NodeIP string
	IP     string
	Port   int
}

type DependsItem struct {
	Annotation string
	Containers []ContainerInfo
}

type Depends struct {
	Data map[string]map[string]map[string]DependsItem // 真正的data
}


# Functions

No description provided by the author

# Structs

No description provided by the author
Container info, aim to make it compatible with old api, having to defined a new struct.
No description provided by the author
No description provided by the author
No description provided by the author
Container info, aim to make it compatible with old api, having to defined a new struct.
No description provided by the author
The ContainerInfo used for dependency.
Coreinfo type.
No description provided by the author
Coreinfo type.
Coreinfo type.
No description provided by the author
Depends API.
No description provided by the author
Config API.
node watcher api, /lain/nodes/nodes.
Coreinfo API.
node watcher api, /lain/nodes/nodes.
PodGroup API.
Localspec API, it do not support watch request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Proxy API.
Coreinfo API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Coreinfo API.