service_manager

package
v0.0.0-...-132f7fb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppManager

type AppManager struct {
	AppMap   map[string]*dao.App
	AppSlice []*dao.App
	Locker   sync.RWMutex
	// contains filtered or unexported fields
}
var AppManagerHandler *AppManager

func NewAppManager

func NewAppManager() *AppManager

func (*AppManager) GetAppList

func (s *AppManager) GetAppList() []*dao.App

func (*AppManager) LoadOnce

func (s *AppManager) LoadOnce() error

todo domark

type LoadBalancer

type LoadBalancer struct {
	LoadBanlanceMap   map[string]*LoadBalancerItem
	LoadBanlanceSlice []*LoadBalancerItem
	Locker            sync.RWMutex
}
var LoadBalancerHandler *LoadBalancer

func NewLoadBalancer

func NewLoadBalancer() *LoadBalancer

func (*LoadBalancer) GetLoadBalancer

func (lbr *LoadBalancer) GetLoadBalancer(service *dao.ServiceDetail) (load_balance.LoadBalance, error)

type LoadBalancerItem

type LoadBalancerItem struct {
	LoadBanlance load_balance.LoadBalance
	ServiceName  string
}

type ServiceManager

type ServiceManager struct {
	ServiceMap   map[string]*dao.ServiceDetail
	ServiceSlice []*dao.ServiceDetail
	Locker       sync.RWMutex
	// contains filtered or unexported fields
}
var ServiceManagerHandler *ServiceManager

func NewServiceManager

func NewServiceManager() *ServiceManager

func (*ServiceManager) GetGrpcServiceList

func (s *ServiceManager) GetGrpcServiceList() []*dao.ServiceDetail

func (*ServiceManager) GetTcpServiceList

func (s *ServiceManager) GetTcpServiceList() []*dao.ServiceDetail

func (*ServiceManager) HTTPAccessMode

func (s *ServiceManager) HTTPAccessMode(c *gin.Context) (*dao.ServiceDetail, error)

func (*ServiceManager) LoadOnce

func (s *ServiceManager) LoadOnce() error

type TransportItem

type TransportItem struct {
	Trans       *http.Transport
	ServiceName string
}

type Transportor

type Transportor struct {
	TransportMap   map[string]*TransportItem
	TransportSlice []*TransportItem
	Locker         sync.RWMutex
}
var TransportorHandler *Transportor

func NewTransportor

func NewTransportor() *Transportor

func (*Transportor) GetTrans

func (t *Transportor) GetTrans(service *dao.ServiceDetail) (*http.Transport, error)

Jump to

Keyboard shortcuts

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