db

package
v0.0.0-...-073d460 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *gorm.DB

Functions

func AddDeploy

func AddDeploy(d *Deploy) error

func AddPod

func AddPod(p Pod) error

func AddPods

func AddPods(ps []Pod) error

func GetPodPortBySvc

func GetPodPortBySvc(svc string) string

func UpdatePod

func UpdatePod(p *Pod) error

Types

type Deploy

type Deploy struct {
	ID   int
	Name string
	Env  string
}

func GetDeploys

func GetDeploys() []Deploy

func GetOneDeploy

func GetOneDeploy(name string, gwEnv string) Deploy

func (Deploy) TableName

func (d Deploy) TableName() string

type Pod

type Pod struct {
	ID    int
	Did   int
	Name  string
	Eid   int
	Ename string
	Addr  string
	Env   string
	Cid   string
}

func GetPods

func GetPods(did int) []Pod

func GetPodsByPort

func GetPodsByPort(hostPort string) []Pod

func GetPodsBySvc

func GetPodsBySvc(svcName string, gwEnv string) []Pod

func (Pod) TableName

func (p Pod) TableName() string

Jump to

Keyboard shortcuts

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