update sd interface
This commit is contained in:
parent
8835e0e647
commit
55d7b2e312
9
sd/sd.go
9
sd/sd.go
@ -9,16 +9,17 @@ type Options struct{}
|
|||||||
type Option func(opts *Options)
|
type Option func(opts *Options)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Node string
|
ID string
|
||||||
Name string
|
Name string
|
||||||
|
Node string
|
||||||
Network string
|
Network string
|
||||||
Address string
|
Address string
|
||||||
}
|
}
|
||||||
|
|
||||||
// SD is the service discovery interface.
|
// SD is the service discovery interface.
|
||||||
type SD interface {
|
type SD interface {
|
||||||
Register(ctx context.Context, name string, network string, address string, opts ...Option) error
|
Register(ctx context.Context, service *Service, opts ...Option) error
|
||||||
Deregister(ctx context.Context, name string) error
|
Deregister(ctx context.Context, service *Service) error
|
||||||
Renew(ctx context.Context, name string) error
|
Renew(ctx context.Context, service *Service) error
|
||||||
Get(ctx context.Context, name string) ([]*Service, error)
|
Get(ctx context.Context, name string) ([]*Service, error)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user