Documentation
¶
Index ¶
Constants ¶
View Source
const InstanceTypeGRPC = "GRPC"
View Source
const InstanceTypeHttp = "HTTP"
Variables ¶
This section is empty.
Functions ¶
func GetServerId ¶
func GetServerName ¶
Types ¶
type Register ¶
type Register interface {
Register(ctx context.Context, serviceInstance *ServiceInstance) error
DeRegister(ctx context.Context, serviceInstance *ServiceInstance) error
List(ctx context.Context, serviceName string) ([]*ServiceInstance, error)
Subscribe(ctx context.Context, serviceName string) (<-chan *ServiceInstance, error)
}
type ServiceInstance ¶
func NewServiceInstance ¶
func NewServiceInstance(serverName, address string, port int, instanceType string) *ServiceInstance
Click to show internal directories.
Click to hide internal directories.