// serviceConfig is a deserialized form of the config file format which ConfigSourceFile accepts.
// TODO: this is apparently untested; is it used?
typeserviceConfigstruct{
Services[]struct{
Namestring`json: "name"`
Portint`json: "port"`
Endpoints[]string`json: "endpoints"`
}`json:"service"`
}
// ConfigSourceFile periodically reads service configurations in JSON from a file, and sends the services and endpoints defined in the file to the specified channels.
typeConfigSourceFilestruct{
serviceChannelchanServiceUpdate
endpointsChannelchanEndpointsUpdate
filenamestring
}
// NewConfigSourceFile creates a new ConfigSourceFile and let it immediately runs the created ConfigSourceFile in a goroutine.