pb

package
Version: v0.0.0-...-b951421 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncTypeEnum_name = map[int32]string{
		0: "None",
		1: "Yes",
	}
	SyncTypeEnum_value = map[string]int32{
		"None": 0,
		"Yes":  1,
	}
)

Enum value maps for SyncTypeEnum.

View Source
var File_registry_proto protoreflect.FileDescriptor
View Source
var RegistryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "com.busgo.registry.proto.RegistryService",
	HandlerType: (*RegistryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "register",
			Handler:    _RegistryService_Register_Handler,
		},
		{
			MethodName: "renew",
			Handler:    _RegistryService_Renew_Handler,
		},
		{
			MethodName: "cancel",
			Handler:    _RegistryService_Cancel_Handler,
		},
		{
			MethodName: "fetch",
			Handler:    _RegistryService_Fetch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "registry.proto",
}

RegistryService_ServiceDesc is the grpc.ServiceDesc for RegistryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRegistryServiceServer

func RegisterRegistryServiceServer(s grpc.ServiceRegistrar, srv RegistryServiceServer)

Types

type CancelRequest

type CancelRequest struct {
	Segment     string       `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	ServiceName string       `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Ip          string       `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port        int32        `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	SyncType    SyncTypeEnum `protobuf:"varint,11,opt,name=syncType,proto3,enum=com.busgo.registry.proto.SyncTypeEnum" json:"syncType,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelRequest) Descriptor deprecated

This method has been deprecated.
func (*CancelRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead.

func (*CancelRequest) GetIp

func (x *CancelRequest) GetIp() string

func (*CancelRequest) GetPort

func (x *CancelRequest) GetPort() int32

func (*CancelRequest) GetSegment

func (x *CancelRequest) GetSegment() string

func (*CancelRequest) GetServiceName

func (x *CancelRequest) GetServiceName() string

func (*CancelRequest) GetSyncType

func (x *CancelRequest) GetSyncType() SyncTypeEnum

func (*CancelRequest) ProtoMessage

func (*CancelRequest) ProtoMessage()

func (*CancelRequest) ProtoReflect

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

func (*CancelRequest) Reset

func (x *CancelRequest) Reset()

func (*CancelRequest) String

func (x *CancelRequest) String() string

type CancelResponse

type CancelResponse struct {
	Code     int32            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message  string           `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Instance *ServiceInstance `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelResponse) Descriptor deprecated

This method has been deprecated.
func (*CancelResponse) Descriptor() ([]byte, []int)

Deprecated: Use CancelResponse.ProtoReflect.Descriptor instead.

func (*CancelResponse) GetCode

func (x *CancelResponse) GetCode() int32

func (*CancelResponse) GetInstance

func (x *CancelResponse) GetInstance() *ServiceInstance

func (*CancelResponse) GetMessage

func (x *CancelResponse) GetMessage() string

func (*CancelResponse) ProtoMessage

func (*CancelResponse) ProtoMessage()

func (*CancelResponse) ProtoReflect

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

func (*CancelResponse) Reset

func (x *CancelResponse) Reset()

func (*CancelResponse) String

func (x *CancelResponse) String() string

type FetchRequest

type FetchRequest struct {
	Segment     string `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	ServiceName string `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchRequest) Descriptor deprecated

This method has been deprecated.
func (*FetchRequest) Descriptor() ([]byte, []int)

Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.

func (*FetchRequest) GetSegment

func (x *FetchRequest) GetSegment() string

func (*FetchRequest) GetServiceName

func (x *FetchRequest) GetServiceName() string

func (*FetchRequest) ProtoMessage

func (*FetchRequest) ProtoMessage()

func (*FetchRequest) ProtoReflect

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

func (*FetchRequest) Reset

func (x *FetchRequest) Reset()

func (*FetchRequest) String

func (x *FetchRequest) String() string

type FetchResponse

type FetchResponse struct {
	Code      int32              `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message   string             `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Instances []*ServiceInstance `protobuf:"bytes,3,rep,name=instances,proto3" json:"instances,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchResponse) Descriptor deprecated

This method has been deprecated.
func (*FetchResponse) Descriptor() ([]byte, []int)

Deprecated: Use FetchResponse.ProtoReflect.Descriptor instead.

func (*FetchResponse) GetCode

func (x *FetchResponse) GetCode() int32

func (*FetchResponse) GetInstances

func (x *FetchResponse) GetInstances() []*ServiceInstance

func (*FetchResponse) GetMessage

func (x *FetchResponse) GetMessage() string

func (*FetchResponse) ProtoMessage

func (*FetchResponse) ProtoMessage()

func (*FetchResponse) ProtoReflect

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

func (*FetchResponse) Reset

func (x *FetchResponse) Reset()

func (*FetchResponse) String

func (x *FetchResponse) String() string

type RegisterRequest

type RegisterRequest struct {
	Segment         string            `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	ServiceName     string            `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Ip              string            `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port            int32             `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	Metadata        map[string]string `` /* 157-byte string literal not displayed */
	RegTimestamp    int64             `protobuf:"varint,6,opt,name=regTimestamp,proto3" json:"regTimestamp,omitempty"`
	UpTimestamp     int64             `protobuf:"varint,7,opt,name=upTimestamp,proto3" json:"upTimestamp,omitempty"`
	RenewTimestamp  int64             `protobuf:"varint,8,opt,name=renewTimestamp,proto3" json:"renewTimestamp,omitempty"`
	DirtyTimestamp  int64             `protobuf:"varint,9,opt,name=dirtyTimestamp,proto3" json:"dirtyTimestamp,omitempty"`
	LatestTimestamp int64             `protobuf:"varint,10,opt,name=latestTimestamp,proto3" json:"latestTimestamp,omitempty"`
	SyncType        SyncTypeEnum      `protobuf:"varint,11,opt,name=syncType,proto3,enum=com.busgo.registry.proto.SyncTypeEnum" json:"syncType,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

This method has been deprecated.
func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetDirtyTimestamp

func (x *RegisterRequest) GetDirtyTimestamp() int64

func (*RegisterRequest) GetIp

func (x *RegisterRequest) GetIp() string

func (*RegisterRequest) GetLatestTimestamp

func (x *RegisterRequest) GetLatestTimestamp() int64

func (*RegisterRequest) GetMetadata

func (x *RegisterRequest) GetMetadata() map[string]string

func (*RegisterRequest) GetPort

func (x *RegisterRequest) GetPort() int32

func (*RegisterRequest) GetRegTimestamp

func (x *RegisterRequest) GetRegTimestamp() int64

func (*RegisterRequest) GetRenewTimestamp

func (x *RegisterRequest) GetRenewTimestamp() int64

func (*RegisterRequest) GetSegment

func (x *RegisterRequest) GetSegment() string

func (*RegisterRequest) GetServiceName

func (x *RegisterRequest) GetServiceName() string

func (*RegisterRequest) GetSyncType

func (x *RegisterRequest) GetSyncType() SyncTypeEnum

func (*RegisterRequest) GetUpTimestamp

func (x *RegisterRequest) GetUpTimestamp() int64

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {
	Code     int32            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message  string           `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Instance *ServiceInstance `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

This method has been deprecated.
func (*RegisterResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetCode

func (x *RegisterResponse) GetCode() int32

func (*RegisterResponse) GetInstance

func (x *RegisterResponse) GetInstance() *ServiceInstance

func (*RegisterResponse) GetMessage

func (x *RegisterResponse) GetMessage() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type RegistryServiceClient

type RegistryServiceClient interface {
	// register a service instance
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	// renew a service instance
	Renew(ctx context.Context, in *RenewRequest, opts ...grpc.CallOption) (*RenewResponse, error)
	// cancel a service instance
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error)
	// fetch service instance list
	Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchResponse, error)
}

RegistryServiceClient is the client API for RegistryService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type RegistryServiceServer

type RegistryServiceServer interface {
	// register a service instance
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// renew a service instance
	Renew(context.Context, *RenewRequest) (*RenewResponse, error)
	// cancel a service instance
	Cancel(context.Context, *CancelRequest) (*CancelResponse, error)
	// fetch service instance list
	Fetch(context.Context, *FetchRequest) (*FetchResponse, error)
	// contains filtered or unexported methods
}

RegistryServiceServer is the server API for RegistryService service. All implementations must embed UnimplementedRegistryServiceServer for forward compatibility

type RenewRequest

type RenewRequest struct {
	Segment     string       `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	ServiceName string       `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Ip          string       `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port        int32        `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	SyncType    SyncTypeEnum `protobuf:"varint,11,opt,name=syncType,proto3,enum=com.busgo.registry.proto.SyncTypeEnum" json:"syncType,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewRequest) Descriptor deprecated

This method has been deprecated.
func (*RenewRequest) Descriptor() ([]byte, []int)

Deprecated: Use RenewRequest.ProtoReflect.Descriptor instead.

func (*RenewRequest) GetIp

func (x *RenewRequest) GetIp() string

func (*RenewRequest) GetPort

func (x *RenewRequest) GetPort() int32

func (*RenewRequest) GetSegment

func (x *RenewRequest) GetSegment() string

func (*RenewRequest) GetServiceName

func (x *RenewRequest) GetServiceName() string

func (*RenewRequest) GetSyncType

func (x *RenewRequest) GetSyncType() SyncTypeEnum

func (*RenewRequest) ProtoMessage

func (*RenewRequest) ProtoMessage()

func (*RenewRequest) ProtoReflect

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

func (*RenewRequest) Reset

func (x *RenewRequest) Reset()

func (*RenewRequest) String

func (x *RenewRequest) String() string

type RenewResponse

type RenewResponse struct {
	Code     int32            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message  string           `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Instance *ServiceInstance `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*RenewResponse) Descriptor deprecated

This method has been deprecated.
func (*RenewResponse) Descriptor() ([]byte, []int)

Deprecated: Use RenewResponse.ProtoReflect.Descriptor instead.

func (*RenewResponse) GetCode

func (x *RenewResponse) GetCode() int32

func (*RenewResponse) GetInstance

func (x *RenewResponse) GetInstance() *ServiceInstance

func (*RenewResponse) GetMessage

func (x *RenewResponse) GetMessage() string

func (*RenewResponse) ProtoMessage

func (*RenewResponse) ProtoMessage()

func (*RenewResponse) ProtoReflect

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

func (*RenewResponse) Reset

func (x *RenewResponse) Reset()

func (*RenewResponse) String

func (x *RenewResponse) String() string

type ServiceInstance

type ServiceInstance struct {
	Segment         string            `protobuf:"bytes,1,opt,name=segment,proto3" json:"segment,omitempty"`
	ServiceName     string            `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Ip              string            `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port            int32             `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	Metadata        map[string]string `` /* 157-byte string literal not displayed */
	RegTimestamp    int64             `protobuf:"varint,6,opt,name=regTimestamp,proto3" json:"regTimestamp,omitempty"`
	UpTimestamp     int64             `protobuf:"varint,7,opt,name=upTimestamp,proto3" json:"upTimestamp,omitempty"`
	RenewTimestamp  int64             `protobuf:"varint,8,opt,name=renewTimestamp,proto3" json:"renewTimestamp,omitempty"`
	DirtyTimestamp  int64             `protobuf:"varint,9,opt,name=dirtyTimestamp,proto3" json:"dirtyTimestamp,omitempty"`
	LatestTimestamp int64             `protobuf:"varint,10,opt,name=latestTimestamp,proto3" json:"latestTimestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceInstance) Descriptor deprecated

This method has been deprecated.
func (*ServiceInstance) Descriptor() ([]byte, []int)

Deprecated: Use ServiceInstance.ProtoReflect.Descriptor instead.

func (*ServiceInstance) GetDirtyTimestamp

func (x *ServiceInstance) GetDirtyTimestamp() int64

func (*ServiceInstance) GetIp

func (x *ServiceInstance) GetIp() string

func (*ServiceInstance) GetLatestTimestamp

func (x *ServiceInstance) GetLatestTimestamp() int64

func (*ServiceInstance) GetMetadata

func (x *ServiceInstance) GetMetadata() map[string]string

func (*ServiceInstance) GetPort

func (x *ServiceInstance) GetPort() int32

func (*ServiceInstance) GetRegTimestamp

func (x *ServiceInstance) GetRegTimestamp() int64

func (*ServiceInstance) GetRenewTimestamp

func (x *ServiceInstance) GetRenewTimestamp() int64

func (*ServiceInstance) GetSegment

func (x *ServiceInstance) GetSegment() string

func (*ServiceInstance) GetServiceName

func (x *ServiceInstance) GetServiceName() string

func (*ServiceInstance) GetUpTimestamp

func (x *ServiceInstance) GetUpTimestamp() int64

func (*ServiceInstance) ProtoMessage

func (*ServiceInstance) ProtoMessage()

func (*ServiceInstance) ProtoReflect

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

func (*ServiceInstance) Reset

func (x *ServiceInstance) Reset()

func (*ServiceInstance) String

func (x *ServiceInstance) String() string

type SyncTypeEnum

type SyncTypeEnum int32
const (
	SyncTypeEnum_None SyncTypeEnum = 0
	SyncTypeEnum_Yes  SyncTypeEnum = 1
)

func (SyncTypeEnum) Descriptor

func (SyncTypeEnum) Enum

func (x SyncTypeEnum) Enum() *SyncTypeEnum

func (SyncTypeEnum) EnumDescriptor deprecated

This method has been deprecated.
func (SyncTypeEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use SyncTypeEnum.Descriptor instead.

func (SyncTypeEnum) Number

func (SyncTypeEnum) String

func (x SyncTypeEnum) String() string

func (SyncTypeEnum) Type

type UnimplementedRegistryServiceServer

type UnimplementedRegistryServiceServer struct {
}

UnimplementedRegistryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRegistryServiceServer) Cancel

func (UnimplementedRegistryServiceServer) Fetch

func (UnimplementedRegistryServiceServer) Register

func (UnimplementedRegistryServiceServer) Renew

type UnsafeRegistryServiceServer

type UnsafeRegistryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistryServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL