2022-11-01 15:03:23 -04:00
|
|
|
package service
|
|
|
|
|
2023-01-11 15:34:27 -06:00
|
|
|
import "github.com/hashicorp/consul/api"
|
2023-01-04 15:28:15 -05:00
|
|
|
|
2022-11-01 15:03:23 -04: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 15:28:15 -05:00
|
|
|
// Export a service to the peering cluster
|
|
|
|
Export(partition, peer string, client *api.Client) error
|
|
|
|
GetServiceName() string
|
2022-11-01 15:03:23 -04:00
|
|
|
}
|