register

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: LGPL-3.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

View Source
const (
	WatermelonEndpointTag = "watermelon-endpoint"
)

Variables

This section is empty.

Functions

func GetEndpointFromTags

func GetEndpointFromTags(tags map[string]string) string

func NewTags

func NewTags() map[string]string

func SetEndpointIntoTags

func SetEndpointIntoTags(tags map[string]string, endpoint string)

Types

type GrpcMethodInfo

type GrpcMethodInfo struct {
	// Name is the method name only, without the service name or package name.
	Name string `json:"name"`
	// IsClientStream indicates whether the RPC is a client streaming RPC.
	IsClientStream bool `json:"is_client_stream"`
	// IsServerStream indicates whether the RPC is a server streaming RPC.
	IsServerStream bool `json:"is_server_stream"`
}

type NodeMeta

type NodeMeta struct {
	Host        string           `json:"host"`
	Port        int              `json:"port"`
	ServiceName string           `json:"service_name"`
	GrpcMethods []GrpcMethodInfo `json:"methods"`
	Runtime     string           `json:"runtime"`
	Version     string           `json:"version"`
}

type NodeMetaKey

type NodeMetaKey struct{}

type ServiceRegister

type ServiceRegister[T any] interface {
	Register() error
	Close()
	SetMetas([]T)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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