Documentation
¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
syncer.proto
It has these top-level messages:
PullRequest SyncData SyncService SyncInstance Expansion HealthCheck MappingEntry * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Variables
- func RegisterSyncServer(s *grpc.Server, srv SyncServer)
- type Expansion
- type Expansions
- type HealthCheck
- func (*HealthCheck) Descriptor() ([]byte, []int)
- func (m *HealthCheck) GetInterval() int32
- func (m *HealthCheck) GetMode() HealthCheck_Modes
- func (m *HealthCheck) GetPort() int32
- func (m *HealthCheck) GetTimes() int32
- func (m *HealthCheck) GetUrl() string
- func (*HealthCheck) ProtoMessage()
- func (m *HealthCheck) Reset()
- func (m *HealthCheck) String() string
- type HealthCheck_Modes
- type MappingEntry
- func (*MappingEntry) Descriptor() ([]byte, []int)
- func (m *MappingEntry) GetClusterName() string
- func (m *MappingEntry) GetCurInstanceID() string
- func (m *MappingEntry) GetCurServiceID() string
- func (m *MappingEntry) GetDomainProject() string
- func (m *MappingEntry) GetOrgInstanceID() string
- func (m *MappingEntry) GetOrgServiceID() string
- func (*MappingEntry) ProtoMessage()
- func (m *MappingEntry) Reset()
- func (m *MappingEntry) String() string
- type PullRequest
- type SyncClient
- type SyncData
- type SyncInstance
- func (*SyncInstance) Descriptor() ([]byte, []int)
- func (m *SyncInstance) GetEndpoints() []string
- func (m *SyncInstance) GetExpansions() []*Expansion
- func (m *SyncInstance) GetHealthCheck() *HealthCheck
- func (m *SyncInstance) GetHostName() string
- func (m *SyncInstance) GetInstanceId() string
- func (m *SyncInstance) GetPluginName() string
- func (m *SyncInstance) GetServiceId() string
- func (m *SyncInstance) GetStatus() SyncInstance_Status
- func (m *SyncInstance) GetVersion() string
- func (*SyncInstance) ProtoMessage()
- func (m *SyncInstance) Reset()
- func (m *SyncInstance) String() string
- type SyncInstance_Status
- type SyncMapping
- type SyncServer
- type SyncService
- func (*SyncService) Descriptor() ([]byte, []int)
- func (m *SyncService) GetApp() string
- func (m *SyncService) GetDomainProject() string
- func (m *SyncService) GetEnvironment() string
- func (m *SyncService) GetExpansions() []*Expansion
- func (m *SyncService) GetName() string
- func (m *SyncService) GetPluginName() string
- func (m *SyncService) GetServiceId() string
- func (m *SyncService) GetStatus() SyncService_Status
- func (m *SyncService) GetVersion() string
- func (*SyncService) ProtoMessage()
- func (m *SyncService) Reset()
- func (m *SyncService) String() string
- type SyncService_Status
Constants ¶
This section is empty.
Variables ¶
View Source
var HealthCheck_Modes_name = map[int32]string{
0: "UNKNOWN",
1: "PUSH",
2: "PULL",
}
View Source
var HealthCheck_Modes_value = map[string]int32{
"UNKNOWN": 0,
"PUSH": 1,
"PULL": 2,
}
View Source
var SyncInstance_Status_name = map[int32]string{
0: "UNKNOWN",
1: "UP",
2: "DOWN",
3: "STARTING",
4: "OUTOFSERVICE",
}
View Source
var SyncInstance_Status_value = map[string]int32{
"UNKNOWN": 0,
"UP": 1,
"DOWN": 2,
"STARTING": 3,
"OUTOFSERVICE": 4,
}
View Source
var SyncService_Status_name = map[int32]string{
0: "UNKNOWN",
1: "UP",
2: "DOWN",
}
View Source
var SyncService_Status_value = map[string]int32{
"UNKNOWN": 0,
"UP": 1,
"DOWN": 2,
}
Functions ¶
func RegisterSyncServer ¶
func RegisterSyncServer(s *grpc.Server, srv SyncServer)
Types ¶
type Expansion ¶
type Expansion struct { Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"` Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` Labels map[string]string `` /* 132-byte string literal not displayed */ }
func (*Expansion) Descriptor ¶
func (*Expansion) ProtoMessage ¶
func (*Expansion) ProtoMessage()
type Expansions ¶
type Expansions []*Expansion
func (Expansions) Find ¶
func (e Expansions) Find(kind string, labels map[string]string) Expansions
type HealthCheck ¶
type HealthCheck struct { Mode HealthCheck_Modes `protobuf:"varint,1,opt,name=mode,enum=proto.HealthCheck_Modes" 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"` Url string `protobuf:"bytes,5,opt,name=url" json:"url,omitempty"` }
func (*HealthCheck) Descriptor ¶
func (*HealthCheck) Descriptor() ([]byte, []int)
func (*HealthCheck) GetInterval ¶
func (m *HealthCheck) GetInterval() int32
func (*HealthCheck) GetMode ¶
func (m *HealthCheck) GetMode() HealthCheck_Modes
func (*HealthCheck) GetPort ¶
func (m *HealthCheck) GetPort() int32
func (*HealthCheck) GetTimes ¶
func (m *HealthCheck) GetTimes() int32
func (*HealthCheck) GetUrl ¶
func (m *HealthCheck) GetUrl() string
func (*HealthCheck) ProtoMessage ¶
func (*HealthCheck) ProtoMessage()
func (*HealthCheck) Reset ¶
func (m *HealthCheck) Reset()
func (*HealthCheck) String ¶
func (m *HealthCheck) String() string
type HealthCheck_Modes ¶
type HealthCheck_Modes int32
const ( HealthCheck_UNKNOWN HealthCheck_Modes = 0 HealthCheck_PUSH HealthCheck_Modes = 1 HealthCheck_PULL HealthCheck_Modes = 2 )
func (HealthCheck_Modes) EnumDescriptor ¶
func (HealthCheck_Modes) EnumDescriptor() ([]byte, []int)
func (HealthCheck_Modes) String ¶
func (x HealthCheck_Modes) String() string
type MappingEntry ¶
type MappingEntry struct { ClusterName string `protobuf:"bytes,1,opt,name=clusterName" json:"clusterName,omitempty"` // Tenant tenant = 2; DomainProject string `protobuf:"bytes,2,opt,name=domainProject" json:"domainProject,omitempty"` OrgServiceID string `protobuf:"bytes,3,opt,name=orgServiceID" json:"orgServiceID,omitempty"` OrgInstanceID string `protobuf:"bytes,4,opt,name=orgInstanceID" json:"orgInstanceID,omitempty"` CurServiceID string `protobuf:"bytes,5,opt,name=curServiceID" json:"curServiceID,omitempty"` CurInstanceID string `protobuf:"bytes,6,opt,name=curInstanceID" json:"curInstanceID,omitempty"` }
func (*MappingEntry) Descriptor ¶
func (*MappingEntry) Descriptor() ([]byte, []int)
func (*MappingEntry) GetClusterName ¶
func (m *MappingEntry) GetClusterName() string
func (*MappingEntry) GetCurInstanceID ¶
func (m *MappingEntry) GetCurInstanceID() string
func (*MappingEntry) GetCurServiceID ¶
func (m *MappingEntry) GetCurServiceID() string
func (*MappingEntry) GetDomainProject ¶
func (m *MappingEntry) GetDomainProject() string
func (*MappingEntry) GetOrgInstanceID ¶
func (m *MappingEntry) GetOrgInstanceID() string
func (*MappingEntry) GetOrgServiceID ¶
func (m *MappingEntry) GetOrgServiceID() string
func (*MappingEntry) ProtoMessage ¶
func (*MappingEntry) ProtoMessage()
func (*MappingEntry) Reset ¶
func (m *MappingEntry) Reset()
func (*MappingEntry) String ¶
func (m *MappingEntry) String() string
type PullRequest ¶
type PullRequest struct { ServiceName string `protobuf:"bytes,1,opt,name=serviceName" json:"serviceName,omitempty"` Options string `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` Time string `protobuf:"bytes,3,opt,name=time" json:"time,omitempty"` }
func (*PullRequest) Descriptor ¶
func (*PullRequest) Descriptor() ([]byte, []int)
func (*PullRequest) GetOptions ¶
func (m *PullRequest) GetOptions() string
func (*PullRequest) GetServiceName ¶
func (m *PullRequest) GetServiceName() string
func (*PullRequest) GetTime ¶
func (m *PullRequest) GetTime() string
func (*PullRequest) ProtoMessage ¶
func (*PullRequest) ProtoMessage()
func (*PullRequest) Reset ¶
func (m *PullRequest) Reset()
func (*PullRequest) String ¶
func (m *PullRequest) String() string
type SyncClient ¶
type SyncClient interface {
Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*SyncData, error)
}
func NewSyncClient ¶
func NewSyncClient(cc *grpc.ClientConn) SyncClient
type SyncData ¶
type SyncData struct { Services []*SyncService `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"` Instances []*SyncInstance `protobuf:"bytes,2,rep,name=instances" json:"instances,omitempty"` }
func (*SyncData) Descriptor ¶
func (*SyncData) GetInstances ¶
func (m *SyncData) GetInstances() []*SyncInstance
func (*SyncData) GetServices ¶
func (m *SyncData) GetServices() []*SyncService
func (*SyncData) ProtoMessage ¶
func (*SyncData) ProtoMessage()
type SyncInstance ¶
type SyncInstance 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 SyncInstance_Status `protobuf:"varint,5,opt,name=status,enum=proto.SyncInstance_Status" json:"status,omitempty"` HealthCheck *HealthCheck `protobuf:"bytes,6,opt,name=healthCheck" json:"healthCheck,omitempty"` Version string `protobuf:"bytes,7,opt,name=version" json:"version,omitempty"` PluginName string `protobuf:"bytes,8,opt,name=pluginName" json:"pluginName,omitempty"` Expansions []*Expansion `protobuf:"bytes,9,rep,name=expansions" json:"expansions,omitempty"` }
func (*SyncInstance) Descriptor ¶
func (*SyncInstance) Descriptor() ([]byte, []int)
func (*SyncInstance) GetEndpoints ¶
func (m *SyncInstance) GetEndpoints() []string
func (*SyncInstance) GetExpansions ¶
func (m *SyncInstance) GetExpansions() []*Expansion
func (*SyncInstance) GetHealthCheck ¶
func (m *SyncInstance) GetHealthCheck() *HealthCheck
func (*SyncInstance) GetHostName ¶
func (m *SyncInstance) GetHostName() string
func (*SyncInstance) GetInstanceId ¶
func (m *SyncInstance) GetInstanceId() string
func (*SyncInstance) GetPluginName ¶
func (m *SyncInstance) GetPluginName() string
func (*SyncInstance) GetServiceId ¶
func (m *SyncInstance) GetServiceId() string
func (*SyncInstance) GetStatus ¶
func (m *SyncInstance) GetStatus() SyncInstance_Status
func (*SyncInstance) GetVersion ¶
func (m *SyncInstance) GetVersion() string
func (*SyncInstance) ProtoMessage ¶
func (*SyncInstance) ProtoMessage()
func (*SyncInstance) Reset ¶
func (m *SyncInstance) Reset()
func (*SyncInstance) String ¶
func (m *SyncInstance) String() string
type SyncInstance_Status ¶
type SyncInstance_Status int32
const ( SyncInstance_UNKNOWN SyncInstance_Status = 0 SyncInstance_UP SyncInstance_Status = 1 SyncInstance_DOWN SyncInstance_Status = 2 SyncInstance_STARTING SyncInstance_Status = 3 SyncInstance_OUTOFSERVICE SyncInstance_Status = 4 )
func (SyncInstance_Status) EnumDescriptor ¶
func (SyncInstance_Status) EnumDescriptor() ([]byte, []int)
func (SyncInstance_Status) String ¶
func (x SyncInstance_Status) String() string
type SyncMapping ¶
type SyncMapping []*MappingEntry
func (SyncMapping) CurrentIndex ¶
func (s SyncMapping) CurrentIndex(instanceID string) int
func (SyncMapping) OriginIndex ¶
func (s SyncMapping) OriginIndex(instanceID string) int
type SyncServer ¶
type SyncServer interface {
Pull(context.Context, *PullRequest) (*SyncData, error)
}
type SyncService ¶
type SyncService struct { ServiceId string `protobuf:"bytes,1,opt,name=serviceId" json:"serviceId,omitempty"` App string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` Status SyncService_Status `protobuf:"varint,5,opt,name=status,enum=proto.SyncService_Status" json:"status,omitempty"` DomainProject string `protobuf:"bytes,6,opt,name=domainProject" json:"domainProject,omitempty"` Environment string `protobuf:"bytes,7,opt,name=environment" json:"environment,omitempty"` PluginName string `protobuf:"bytes,8,opt,name=pluginName" json:"pluginName,omitempty"` Expansions []*Expansion `protobuf:"bytes,9,rep,name=expansions" json:"expansions,omitempty"` }
func (*SyncService) Descriptor ¶
func (*SyncService) Descriptor() ([]byte, []int)
func (*SyncService) GetApp ¶
func (m *SyncService) GetApp() string
func (*SyncService) GetDomainProject ¶
func (m *SyncService) GetDomainProject() string
func (*SyncService) GetEnvironment ¶
func (m *SyncService) GetEnvironment() string
func (*SyncService) GetExpansions ¶
func (m *SyncService) GetExpansions() []*Expansion
func (*SyncService) GetName ¶
func (m *SyncService) GetName() string
func (*SyncService) GetPluginName ¶
func (m *SyncService) GetPluginName() string
func (*SyncService) GetServiceId ¶
func (m *SyncService) GetServiceId() string
func (*SyncService) GetStatus ¶
func (m *SyncService) GetStatus() SyncService_Status
func (*SyncService) GetVersion ¶
func (m *SyncService) GetVersion() string
func (*SyncService) ProtoMessage ¶
func (*SyncService) ProtoMessage()
func (*SyncService) Reset ¶
func (m *SyncService) Reset()
func (*SyncService) String ¶
func (m *SyncService) String() string
type SyncService_Status ¶
type SyncService_Status int32
const ( SyncService_UNKNOWN SyncService_Status = 0 SyncService_UP SyncService_Status = 1 SyncService_DOWN SyncService_Status = 2 )
func (SyncService_Status) EnumDescriptor ¶
func (SyncService_Status) EnumDescriptor() ([]byte, []int)
func (SyncService_Status) String ¶
func (x SyncService_Status) String() string
Click to show internal directories.
Click to hide internal directories.