-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathresponse.go
More file actions
executable file
·45 lines (40 loc) · 1.61 KB
/
response.go
File metadata and controls
executable file
·45 lines (40 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package sc
import (
"github.com/go-chassis/cari/discovery"
)
const (
// EventCreate is a constant of type string
EventCreate string = "CREATE"
// EventUpdate is a constant of type string
EventUpdate string = "UPDATE"
// EventDelete is a constant of type string
EventDelete string = "DELETE"
// EventError is a constant of type string
EventError string = "ERROR"
// MicorserviceUp is a constant of type string
MicorserviceUp string = "UP"
// MicroserviceDown is a constant of type string
MicroserviceDown string = "DOWN"
// MSInstanceUP is a constant of type string
MSInstanceUP string = "UP"
// MSIinstanceDown is a constant of type string
MSIinstanceDown string = "DOWN"
// CheckByHeartbeat is a constant of type string
CheckByHeartbeat string = "push"
// DefaultLeaseRenewalInterval is a constant of type int which declares default lease renewal time
DefaultLeaseRenewalInterval = 30
)
// MicroServiceProvideResponse is a struct with provider information
type MicroServiceProvideResponse struct {
Services []*discovery.MicroService `json:"providers,omitempty"`
}
// MicroServiceInstanceChangedEvent is a struct to store the Changed event information
type MicroServiceInstanceChangedEvent struct {
Action string `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"`
Key *discovery.MicroServiceKey `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
Instance *discovery.MicroServiceInstance `protobuf:"bytes,4,opt,name=instance" json:"instance,omitempty"`
}
type FindMicroServiceInstancesResult struct {
Instances []*discovery.MicroServiceInstance
Revision string
}