model

package
v0.0.0-...-369f58c Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//EventCreate is a constant of type string
	EventCreate string = "CREATE"
	//EventUpdate is a constant of type string
	EventUpdate string = "UPDATE"
	//EventDelete is a constant of type string
	EventDelete string = "DELETE"
	//EventError is a constant of type string
	EventError string = "ERROR"
	//MicorserviceUp is a constant of type string
	MicorserviceUp string = "UP"
	//MicroserviceDown is a constant of type string
	MicroserviceDown string = "DOWN"
	//MSInstanceUP is a constant of type string
	MSInstanceUP string = "UP"
	//MSIinstanceDown is a constant of type string
	MSIinstanceDown string = "DOWN"
	//CheckByHeartbeat is a constant of type string
	CheckByHeartbeat string = "push"
	//DefaultLeaseRenewalInterval is a constant of type int which declares default lease renewal time
	DefaultLeaseRenewalInterval = 30
	//APIPath is a constant of type string
	APIPath = "/registry/v3"
	//TenantHeader is a constant of type string
	TenantHeader = "X-Domain-Name"
)

Variables

This section is empty.

Functions

func NewCommonException

func NewCommonException(format string, args ...interface{}) error

NewCommonException creates a generic exception

func NewIOException

func NewIOException(e error, args ...interface{}) error

NewIOException create and IO exception

func NewJSONException

func NewJSONException(e error, args ...interface{}) error

NewJSONException creates a JSON exception

Types

type AppsResponse

type AppsResponse struct {
	AppIds []string `json:"appIds,omitempty"`
}

AppsResponse is a struct with list of app ID's

type DataCenterInfo

type DataCenterInfo struct {
	Name          string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Region        string `protobuf:"bytes,2,opt,name=region" json:"region,omitempty"`
	AvailableZone string `protobuf:"bytes,3,opt,name=availableZone" json:"availableZone,omitempty"`
}

DataCenterInfo is a struct with contains the zone information of the data center

type DependencyMicroService

type DependencyMicroService struct {
	AppID       string `protobuf:"bytes,1,opt,name=appId" json:"appId,omitempty"`
	ServiceName string `protobuf:"bytes,2,opt,name=serviceName" json:"serviceName,omitempty"`
	Version     string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
}

DependencyMicroService is a struct to keep dependency information for the microservice

type ExistenceIDResponse

type ExistenceIDResponse struct {
	ServiceID  string `json:"serviceId,omitempty"`
	SchemaID   string `json:"schemaId,omitempty"`
	InstanceID string `json:"instanceId,omitempty"`
}

ExistenceIDResponse is a structure for microservice with serviceID, schemaID and InstanceID

type Framework

type Framework struct {
	Name    string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}

Framework is a struct which contains name and version of the Framework

type GetServicesInfoResponse

type GetServicesInfoResponse struct {
	AllServicesDetail []*ServiceDetail `protobuf:"bytes,2,rep,name=allServicesDetail" json:"allServicesDetail,omitempty"`
}

GetServicesInfoResponse is a struct to keep all the list of services.

type HealthCheck

type HealthCheck struct {
	Mode     string `protobuf:"bytes,1,opt,name=mode" json:"mode,omitempty"`
	Port     int32  `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
	Interval int32  `protobuf:"varint,3,opt,name=interval" json:"interval,omitempty"`
	Times    int32  `protobuf:"varint,4,opt,name=times" json:"times,omitempty"`
}

HealthCheck is struct with contains mode, port and interval of sc from which it needs to poll information

type MicroServciesResponse

type MicroServciesResponse struct {
	Services []*MicroService `json:"services,omitempty"`
}

MicroServciesResponse is a struct with services information

type MicroService

type MicroService struct {
	ServiceID   string                    `protobuf:"bytes,1,opt,name=serviceId" json:"serviceId,omitempty"`
	AppID       string                    `protobuf:"bytes,2,opt,name=appId" json:"appId,omitempty"`
	ServiceName string                    `protobuf:"bytes,3,opt,name=serviceName" json:"serviceName,omitempty"`
	Version     string                    `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
	Description string                    `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
	Level       string                    `protobuf:"bytes,6,opt,name=level" json:"level,omitempty"`
	Schemas     []string                  `protobuf:"bytes,7,rep,name=schemas" json:"schemas,omitempty"`
	Paths       []*ServicePath            `protobuf:"bytes,10,rep,name=paths" json:"paths,omitempty"`
	Status      string                    `protobuf:"bytes,8,opt,name=status" json:"status,omitempty"`
	Properties  map[string]string         `` /* 140-byte string literal not displayed */
	Timestamp   string                    `protobuf:"bytes,11,opt,name=timestamp" json:"timestamp,omitempty"`
	Providers   []*DependencyMicroService `protobuf:"bytes,12,rep,name=providers" json:"providers,omitempty"`
	Framework   *Framework                `protobuf:"bytes,13,opt,name=framework" json:"framework,omitempty"`
	RegisterBy  string                    `protobuf:"bytes,14,opt,name=registerBy" json:"registerBy,omitempty"`
	Environment string                    `protobuf:"bytes,15,opt,name=environment" json:"environment,omitempty"`
}

MicroService is a struct with all detailed information of microservies

type MicroServiceDependency

type MicroServiceDependency struct {
	Consumer  *DependencyMicroService   `protobuf:"bytes,1,opt,name=consumer" json:"consumer,omitempty"`
	Providers []*DependencyMicroService `protobuf:"bytes,2,rep,name=providers" json:"providers,omitempty"`
}

MicroServiceDependency is a struct to keep the all the dependency information

type MicroServiceInstance

type MicroServiceInstance struct {
	InstanceID     string            `protobuf:"bytes,1,opt,name=instanceId" json:"instanceId,omitempty"`
	ServiceID      string            `protobuf:"bytes,2,opt,name=serviceId" json:"serviceId,omitempty"`
	Endpoints      []string          `protobuf:"bytes,3,rep,name=endpoints" json:"endpoints,omitempty"`
	HostName       string            `protobuf:"bytes,4,opt,name=hostName" json:"hostName,omitempty"`
	Status         string            `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"`
	Properties     map[string]string `` /* 140-byte string literal not displayed */
	HealthCheck    *HealthCheck      `protobuf:"bytes,7,opt,name=healthCheck" json:"healthCheck,omitempty"`
	Timestamp      string            `protobuf:"bytes,8,opt,name=timestamp" json:"timestamp,omitempty"`
	DataCenterInfo *DataCenterInfo   `protobuf:"bytes,9,opt,name=dataCenterInfo" json:"dataCenterInfo,omitempty"`
	Version        string            `protobuf:"bytes,11,opt,name=version" json:"version,omitempty"`
}

MicroServiceInstance is a struct to store all the detailed information about micro-service information

type MicroServiceInstanceChangedEvent

type MicroServiceInstanceChangedEvent struct {
	Action   string                `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"`
	Key      *MicroServiceKey      `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
	Instance *MicroServiceInstance `protobuf:"bytes,4,opt,name=instance" json:"instance,omitempty"`
}

MicroServiceInstanceChangedEvent is a struct to store the Changed event information

type MicroServiceInstanceKey

type MicroServiceInstanceKey struct {
	InstanceID string `protobuf:"bytes,1,opt,name=instanceId" json:"instanceId,omitempty"`
	ServiceID  string `protobuf:"bytes,2,opt,name=serviceId" json:"serviceId,omitempty"`
}

MicroServiceInstanceKey is a struct to key ID's of the microservice

type MicroServiceInstanceRequest

type MicroServiceInstanceRequest struct {
	Instance *MicroServiceInstance `json:"instance"`
}

MicroServiceInstanceRequest is struct with microservice instance information

type MicroServiceInstanceSchemaUpdateRequest

type MicroServiceInstanceSchemaUpdateRequest struct {
	SchemaContent string `json:"schema"`
}

MicroServiceInstanceSchemaUpdateRequest is a struct with Schema Content

type MicroServiceInstancesResponse

type MicroServiceInstancesResponse struct {
	Instances []*MicroServiceInstance `json:"instances,omitempty"`
}

MicroServiceInstancesResponse is a struct with instances information

type MicroServiceKey

type MicroServiceKey struct {
	Tenant      string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"`
	Project     string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"`
	AppID       string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty"`
	ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty"`
	Version     string `protobuf:"bytes,5,opt,name=version" json:"version,omitempty"`
	// contains filtered or unexported fields
}

MicroServiceKey is a struct with key information about Microservice

type MicroServiceProvideresponse

type MicroServiceProvideresponse struct {
	Services []*MicroService `json:"providers,omitempty"`
}

MicroServiceProvideresponse is a struct with provider information

type MicroServiceRequest

type MicroServiceRequest struct {
	Service *MicroService `json:"service"`
}

MicroServiceRequest is a struct with microservice information

type MicroServiceResponse

type MicroServiceResponse struct {
	Service *MicroService `json:"service,omitempty"`
}

MicroServiceResponse is a struct with service information

type MircroServiceDependencyRequest

type MircroServiceDependencyRequest struct {
	Dependencies []*MicroServiceDependency `json:"dependencies"`
}

MircroServiceDependencyRequest is a struct with dependencies request

type RegistyException

type RegistyException struct {
	Title   string
	OrglErr error
	Message string
}

RegistyException structure contains message and error information for the exception caused by service-center

func (*RegistyException) Error

func (e *RegistyException) Error() string

Error gets the Error message from the Error

type ServiceDetail

type ServiceDetail struct {
	MicroService         *MicroService           `protobuf:"bytes,1,opt,name=microService" json:"microService,omitempty"`
	Instances            []*MicroServiceInstance `protobuf:"bytes,2,rep,name=instances" json:"instances,omitempty"`
	Providers            []*MicroService         `protobuf:"bytes,5,rep,name=providers" json:"providers,omitempty"`
	Consumers            []*MicroService         `protobuf:"bytes,6,rep,name=consumers" json:"consumers,omitempty"`
	Tags                 map[string]string       `` /* 128-byte string literal not displayed */
	MicroServiceVersions []string                `protobuf:"bytes,8,rep,name=microServiceVersions" json:"microServiceVersions,omitempty"`
}

ServiceDetail is a struct to store all the relevant information for a microservice

type ServicePath

type ServicePath struct {
	Path     string            `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	Property map[string]string `` /* 136-byte string literal not displayed */
}

ServicePath is a struct with path and property information

Jump to

Keyboard shortcuts

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