balance.go 359 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
package entity

import "github.com/eolinker/goku/server/driver"

type Balance struct {
	Name string
	ServiceName string
	ServiceDriver string
	ServiceType string
	AppName string
	Static string
	StaticCluster string
}

func (e *Balance)Type()*Balance  {

	if e!=nil{

		d,has:=driver.Get(e.ServiceDriver)
		if has{
			e.ServiceType = d.Type
		}
	}

	return e
}