nebula

package
v1.5.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PickFirstLoadBalance        = "pick_first"
	RoundRobinLoadBalance       = "round_robin"
	WeightRoundRobinLoadBalance = "weight_round_robin"
	ConsistentHashLoadBalance   = "consistent_hash"
)

Variables

This section is empty.

Functions

func NewAdaptor

func NewAdaptor() discovery.FuncOps

Types

type ServiceInstance

type ServiceInstance struct {
	Schema string `urlenc:"-"`
	Addr   string `urlenc:"-"`
	IP     string `urlenc:"-"`
	Port   int    `urlenc:"-"`
	Node   string `urlenc:"-"`

	Interface string `urlenc:"interface"`
	Methods   string `urlenc:"methods"`

	Application string `urlenc:"application"`
	Project     string `urlenc:"project"`
	Owner       string `urlenc:"owner"`
	Ops         string `urlenc:"ops,omitempty"`
	Category    string `urlenc:"category"`
	Timestamp   uint64 `urlenc:"timestamp"`
	GRPC        string `urlenc:"grpc"`
	PID         uint32 `urlenc:"pid"`
	Group       bool   `urlenc:"group,omitempty"`
	Weight      uint32 `urlenc:"weight"`
	Deprecated  bool   `urlenc:"deprecated"`
	Master      bool   `urlenc:"master"`

	DefaultAsync       bool   `urlenc:"default.async"`
	DefaultCluster     string `urlenc:"default.cluster"`
	DefaultConnections uint32 `urlenc:"default.connections"`
	DefaultLoadBalance string `urlenc:"default.loadbalance"`
	DefaultRequests    uint32 `urlenc:"default.requests"`
	DefaultReties      uint32 `urlenc:"default.reties"`
	DefaultTimeout     uint32 `urlenc:"default.timeout"`

	ServiceType     string `urlenc:"service.type"`
	RealIP          string `urlenc:"real.ip"`
	RealPort        uint16 `urlenc:"real.port"`
	AccessProtected bool   `urlenc:"access.protected"`

	Accesslog bool   `urlenc:"accesslog"`
	Anyhost   bool   `urlenc:"anyhost"`
	Dynamic   bool   `urlenc:"dynamic"`
	Token     bool   `urlenc:"token"`
	Side      string `urlenc:"side"`
	Version   string `urlenc:"version"`

	Extends map[string]string `urlenc:"-"`

	FsmConnectorServiceClusterSet     string `urlenc:"fsm.connector.service.cluster.set,omitempty"`
	FsmConnectorServiceConnectorUid   string `urlenc:"fsm.connector.service.connector.uid,omitempty"`
	FsmConnectorServiceGRPCViaGateway string `urlenc:"fsm.connector.service.grpc.via.gateway"`
	FsmConnectorServiceViaGatewayMode string `urlenc:"fsm.connector.service.via.gateway.mode"`
	// contains filtered or unexported fields
}

func NewServiceInstance

func NewServiceInstance(serviceName, instanceId string) *ServiceInstance

func (*ServiceInstance) GetMetadata

func (ins *ServiceInstance) GetMetadata(key string) (string, bool)

func (*ServiceInstance) InstanceIP

func (ins *ServiceInstance) InstanceIP() string

func (*ServiceInstance) InstanceId

func (ins *ServiceInstance) InstanceId() string

func (*ServiceInstance) InstancePort

func (ins *ServiceInstance) InstancePort() int

func (*ServiceInstance) Marshal

func (ins *ServiceInstance) Marshal() ([]byte, error)

func (*ServiceInstance) Metadatas

func (ins *ServiceInstance) Metadatas() map[string]string

func (*ServiceInstance) ServiceInterface

func (ins *ServiceInstance) ServiceInterface() string

func (*ServiceInstance) ServiceMethods

func (ins *ServiceInstance) ServiceMethods() []string

func (*ServiceInstance) ServiceName

func (ins *ServiceInstance) ServiceName() string

func (*ServiceInstance) ServiceSchema

func (ins *ServiceInstance) ServiceSchema() string

func (*ServiceInstance) SetMetadata

func (ins *ServiceInstance) SetMetadata(key, value string) error

func (*ServiceInstance) Unmarshal

func (ins *ServiceInstance) Unmarshal(instanceId string, data []byte) error

Jump to

Keyboard shortcuts

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