types

package
v0.0.0-...-7a5359b Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigEvent

type ConfigEvent struct {
	EventType   ConfigEventType
	Path        string
	ConfigEntry *ConfiguratorConfig
}

ConfigEvent ...

type ConfigEventType

type ConfigEventType int

ConfigEventType ...

const (
	ConfigEntryAdded ConfigEventType = iota
	ConfigEntryDeleted
	ConfigEntryChanged
)

Enumeration of ConfigEventType

type ConfigItem

type ConfigItem struct {
	Type              string            `yaml:"type"`
	Enabled           bool              `yaml:"enabled"`
	Addresses         []string          `yaml:"addresses"`
	ProviderAddresses []string          `yaml:"providerAddresses"`
	Services          []string          `yaml:"services"`
	Applications      []string          `yaml:"applications"`
	Parameters        map[string]string `yaml:"parameters"`
	Side              string            `yaml:"side"`
}

ConfigItem ...

type ConfiguratorConfig

type ConfiguratorConfig struct {
	ConfigVersion string       `yaml:"configVersion"`
	Scope         string       `yaml:"scope"`
	Key           string       `yaml:"key"`
	Enabled       bool         `yaml:"enabled"`
	Configs       []ConfigItem `yaml:"configs"`
}

ConfiguratorConfig ...

type Instance

type Instance struct {
	Service *Service
	Host    string
	Port    *Port
	Labels  map[string]string
}

Instance is the instance of the service provider instance lables includes:

appName         name of the application which host the service itself
language		language the service is build with
rpcVer			version of the sofa rpc framework
dynamic			...
tartTime		time when this instance is started
version			version of this service instance
accepts			...
delay			...
weight			route weight of this instance
timeout			server side timeout
id				id of the service, already deprecated
pid				process id of the service instance
uniqueId		unique id of the service

type Port

type Port struct {
	Protocol string
	Port     string
}

Port ...

func (*Port) Portoi

func (p *Port) Portoi() int

Portoi convert port to int

type Service

type Service struct {
	Name      string
	Ports     []*Port
	Instances map[string]*Instance
}

Service ...

func (*Service) AddPort

func (s *Service) AddPort(port *Port)

AddPort ...

func (*Service) GetInstances

func (s *Service) GetInstances() map[string]*Instance

GetInstances ...

func (*Service) GetPorts

func (s *Service) GetPorts() []*Port

GetPorts ...

func (*Service) Hostname

func (s *Service) Hostname() string

Hostname ...

type ServiceEvent

type ServiceEvent struct {
	EventType ServiceEventType
	Service   *Service
	Instance  *Instance
	Instances map[string]*Instance
}

ServiceEvent ...

type ServiceEventType

type ServiceEventType int

ServiceEventType ...

const (
	ServiceAdded ServiceEventType = iota
	ServiceDeleted
	ServiceInstanceAdded
	ServiceInstanceDeleted
	ServiceInstancesReplace
)

Enumeration of ServiceEventType

Jump to

Keyboard shortcuts

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