registry

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetaWeight meta region
	MetaRegion = "region"
	// MetaZone meta region
	MetaZone = "zone"
	// MetaHostname meta hostname
	MetaHostname = "hostname"
	// MetaWeight meta weight
	MetaWeight = "weight"
	// MetaOffline meta offline
	MetaOffline = "offline"
	// MetaAddrs meta public ip addrs
	MetaAddrs = "addrs"
	// MetaIPCount meta ip count
	MetaIPCount = "ip_count"
	// MetaConnCount meta conn count
	MetaConnCount = "conn_count"

	// PlatformWeb platform web
	PlatformWeb = "web"
)

Variables

View Source
var File_registry_conf_proto protoreflect.FileDescriptor

Functions

func New added in v0.0.2

func New(c *Conf) (kreg.Registrar, kreg.Discovery)

Types

type Conf

type Conf struct {
	Etcd   *Etcd   `protobuf:"bytes,1,opt,name=etcd,proto3" json:"etcd,omitempty"`
	Consul *Consul `protobuf:"bytes,2,opt,name=consul,proto3" json:"consul,omitempty"`
	Kube   *Kube   `protobuf:"bytes,3,opt,name=kube,proto3" json:"kube,omitempty"`
	// contains filtered or unexported fields
}

func (*Conf) Descriptor deprecated

func (*Conf) Descriptor() ([]byte, []int)

Deprecated: Use Conf.ProtoReflect.Descriptor instead.

func (*Conf) GetConsul

func (x *Conf) GetConsul() *Consul

func (*Conf) GetEtcd

func (x *Conf) GetEtcd() *Etcd

func (*Conf) GetKube added in v0.0.2

func (x *Conf) GetKube() *Kube

func (*Conf) ProtoMessage

func (*Conf) ProtoMessage()

func (*Conf) ProtoReflect

func (x *Conf) ProtoReflect() protoreflect.Message

func (*Conf) Reset

func (x *Conf) Reset()

func (*Conf) String

func (x *Conf) String() string

func (*Conf) Validate

func (m *Conf) Validate() error

Validate checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ConfValidationError

type ConfValidationError struct {
	// contains filtered or unexported fields
}

ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.

func (ConfValidationError) Cause

func (e ConfValidationError) Cause() error

Cause function returns cause value.

func (ConfValidationError) Error

func (e ConfValidationError) Error() string

Error satisfies the builtin error interface

func (ConfValidationError) ErrorName

func (e ConfValidationError) ErrorName() string

ErrorName returns error name.

func (ConfValidationError) Field

func (e ConfValidationError) Field() string

Field function returns field value.

func (ConfValidationError) Key

func (e ConfValidationError) Key() bool

Key function returns key value.

func (ConfValidationError) Reason

func (e ConfValidationError) Reason() string

Reason function returns reason value.

type Consul

type Consul struct {
	Enable      bool                 `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	Address     string               `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	DialTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=dialTimeout,proto3" json:"dialTimeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Consul) Descriptor deprecated

func (*Consul) Descriptor() ([]byte, []int)

Deprecated: Use Consul.ProtoReflect.Descriptor instead.

func (*Consul) GetAddress

func (x *Consul) GetAddress() string

func (*Consul) GetDialTimeout

func (x *Consul) GetDialTimeout() *durationpb.Duration

func (*Consul) GetEnable

func (x *Consul) GetEnable() bool

func (*Consul) ProtoMessage

func (*Consul) ProtoMessage()

func (*Consul) ProtoReflect

func (x *Consul) ProtoReflect() protoreflect.Message

func (*Consul) Reset

func (x *Consul) Reset()

func (*Consul) String

func (x *Consul) String() string

func (*Consul) Validate

func (m *Consul) Validate() error

Validate checks the field values on Consul with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ConsulValidationError

type ConsulValidationError struct {
	// contains filtered or unexported fields
}

ConsulValidationError is the validation error returned by Consul.Validate if the designated constraints aren't met.

func (ConsulValidationError) Cause

func (e ConsulValidationError) Cause() error

Cause function returns cause value.

func (ConsulValidationError) Error

func (e ConsulValidationError) Error() string

Error satisfies the builtin error interface

func (ConsulValidationError) ErrorName

func (e ConsulValidationError) ErrorName() string

ErrorName returns error name.

func (ConsulValidationError) Field

func (e ConsulValidationError) Field() string

Field function returns field value.

func (ConsulValidationError) Key

func (e ConsulValidationError) Key() bool

Key function returns key value.

func (ConsulValidationError) Reason

func (e ConsulValidationError) Reason() string

Reason function returns reason value.

type Etcd

type Etcd struct {
	Enable      bool                 `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	Endpoints   []string             `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	DialTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=dialTimeout,proto3" json:"dialTimeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Etcd) Descriptor deprecated

func (*Etcd) Descriptor() ([]byte, []int)

Deprecated: Use Etcd.ProtoReflect.Descriptor instead.

func (*Etcd) GetDialTimeout

func (x *Etcd) GetDialTimeout() *durationpb.Duration

func (*Etcd) GetEnable

func (x *Etcd) GetEnable() bool

func (*Etcd) GetEndpoints

func (x *Etcd) GetEndpoints() []string

func (*Etcd) ProtoMessage

func (*Etcd) ProtoMessage()

func (*Etcd) ProtoReflect

func (x *Etcd) ProtoReflect() protoreflect.Message

func (*Etcd) Reset

func (x *Etcd) Reset()

func (*Etcd) String

func (x *Etcd) String() string

func (*Etcd) Validate

func (m *Etcd) Validate() error

Validate checks the field values on Etcd with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type EtcdValidationError

type EtcdValidationError struct {
	// contains filtered or unexported fields
}

EtcdValidationError is the validation error returned by Etcd.Validate if the designated constraints aren't met.

func (EtcdValidationError) Cause

func (e EtcdValidationError) Cause() error

Cause function returns cause value.

func (EtcdValidationError) Error

func (e EtcdValidationError) Error() string

Error satisfies the builtin error interface

func (EtcdValidationError) ErrorName

func (e EtcdValidationError) ErrorName() string

ErrorName returns error name.

func (EtcdValidationError) Field

func (e EtcdValidationError) Field() string

Field function returns field value.

func (EtcdValidationError) Key

func (e EtcdValidationError) Key() bool

Key function returns key value.

func (EtcdValidationError) Reason

func (e EtcdValidationError) Reason() string

Reason function returns reason value.

type Kube added in v0.0.2

type Kube struct {
	Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	// contains filtered or unexported fields
}

func (*Kube) Descriptor deprecated added in v0.0.2

func (*Kube) Descriptor() ([]byte, []int)

Deprecated: Use Kube.ProtoReflect.Descriptor instead.

func (*Kube) GetEnable added in v0.0.2

func (x *Kube) GetEnable() bool

func (*Kube) ProtoMessage added in v0.0.2

func (*Kube) ProtoMessage()

func (*Kube) ProtoReflect added in v0.0.2

func (x *Kube) ProtoReflect() protoreflect.Message

func (*Kube) Reset added in v0.0.2

func (x *Kube) Reset()

func (*Kube) String added in v0.0.2

func (x *Kube) String() string

func (*Kube) Validate added in v0.0.2

func (m *Kube) Validate() error

Validate checks the field values on Kube with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type KubeValidationError added in v0.0.2

type KubeValidationError struct {
	// contains filtered or unexported fields
}

KubeValidationError is the validation error returned by Kube.Validate if the designated constraints aren't met.

func (KubeValidationError) Cause added in v0.0.2

func (e KubeValidationError) Cause() error

Cause function returns cause value.

func (KubeValidationError) Error added in v0.0.2

func (e KubeValidationError) Error() string

Error satisfies the builtin error interface

func (KubeValidationError) ErrorName added in v0.0.2

func (e KubeValidationError) ErrorName() string

ErrorName returns error name.

func (KubeValidationError) Field added in v0.0.2

func (e KubeValidationError) Field() string

Field function returns field value.

func (KubeValidationError) Key added in v0.0.2

func (e KubeValidationError) Key() bool

Key function returns key value.

func (KubeValidationError) Reason added in v0.0.2

func (e KubeValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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