2022-11-01 19:03:23 +00:00
|
|
|
package service
|
|
|
|
|
2023-01-11 21:34:27 +00:00
|
|
|
import "github.com/hashicorp/consul/api"
|
2023-01-04 20:28:15 +00:00
|
|
|
|
2022-11-01 19:03:23 +00:00
|
|
|
// Service represents a process that will be registered with the
|
|
|
|
// Consul catalog, including Consul components such as sidecars and gateways
|
|
|
|
type Service interface {
|
|
|
|
Terminate() error
|
|
|
|
GetName() string
|
|
|
|
GetAddr() (string, int)
|
|
|
|
Start() (err error)
|
2023-01-04 20:28:15 +00:00
|
|
|
// Export a service to the peering cluster
|
|
|
|
Export(partition, peer string, client *api.Client) error
|
|
|
|
GetServiceName() string
|
2023-01-18 21:13:55 +00:00
|
|
|
GetAdminAddr() (string, int)
|
2022-11-01 19:03:23 +00:00
|
|
|
}
|