middleware

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MiddlewareInstance = &Middleware{
	Pid2Connect: make(map[uint32]map[string]MiddlewareInfo),
}

Functions

func AddMiddlewareNetwork

func AddMiddlewareNetwork(peerIp string, pid uint32, port uint16, info map[uint32]map[string]MiddlewareInfo)

Types

type Middleware

type Middleware struct {
	Mu          sync.RWMutex
	Pid2Connect map[uint32]map[string]MiddlewareInfo
}

func (*Middleware) SetInfo

func (m *Middleware) SetInfo(info map[uint32]map[string]MiddlewareInfo)

type MiddlewareInfo

type MiddlewareInfo struct {
	ServiceIp   string
	ServicePort uint16
	PeerIp      string
	PeerPort    uint16
	PeerType    MiddlewareType
}

type MiddlewareType

type MiddlewareType int
const (
	RABBIT_MQ MiddlewareType = iota
	KAFKA
	ACTIVE_MQ
	ROCKET_MQ
	MYSQL
	POSTGRESQL
	MONGODB
	UNKNOWN
)

func GetMiddlewareType

func GetMiddlewareType(port uint16) MiddlewareType

func (MiddlewareType) String

func (m MiddlewareType) String() string

Jump to

Keyboard shortcuts

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