protocol

package
v0.0.0-...-2c1c132 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAerakiSupportedProtocols

func IsAerakiSupportedProtocols(name string) bool

IsAerakiSupportedProtocols return true if the protocol is supported by Aeraki, false if not

func RegisterProtocol

func RegisterProtocol(name string, protocol Instance)

RegisterProtocol register custom protocol

Types

type Instance

type Instance string

Instance defines network protocols for ports

const (
	// Dubbo declares that the port carries dubbo traffic.
	Dubbo Instance = "Dubbo"
	// Thrift declares that the port carries Thrift traffic.
	Thrift Instance = "Thrift"
	// Mongo declares that the port carries MongoDB traffic.
	Mongo Instance = "Mongo"
	// Redis declares that the port carries Redis traffic.
	Redis Instance = "Redis"
	// MySQL declares that the port carries MySQL traffic.
	MySQL Instance = "MySQL"
	// Kafka declares that the port carries Kafka traffic.
	Kafka Instance = "Kafka"
	// Zookeeper declares that the port carries Zookeeper traffic.
	Zookeeper Instance = "Zookeeper"
	// MetaProtocol declares that the port carries MetaProtocol traffic.
	MetaProtocol Instance = "MetaProtocol"
	// Unsupported - value to signify that the protocol is unsupported.
	Unsupported Instance = "UnsupportedProtocol"
)

func GetLayer7ProtocolFromPortName

func GetLayer7ProtocolFromPortName(name string) Instance

GetLayer7ProtocolFromPortName extracts the layer-7 protocol name from the port name of a service

func Parse

func Parse(s string) Instance

Parse from string ignoring case

func (Instance) IsDubbo

func (i Instance) IsDubbo() bool

IsDubbo is true for protocols that use Dubbo as transport protocol

func (Instance) IsMetaProtocol

func (i Instance) IsMetaProtocol() bool

IsMetaProtocol is true for protocols that use MetaProtocol as transport protocol

func (Instance) IsThrift

func (i Instance) IsThrift() bool

IsThrift is true for protocols that use Thrift as transport protocol

func (Instance) IsUnsupported

func (i Instance) IsUnsupported() bool

IsUnsupported is true for protocols that are not supported

func (Instance) ToString

func (i Instance) ToString() string

ToString converts an Instance to a string

Jump to

Keyboard shortcuts

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