-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing TrafficController to manage TrafficGate and Pipeline #55
Changes from 1 commit
ddc3b00
89980a6
bbcf544
73221fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…odel
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,10 +56,7 @@ type ( | |
} | ||
|
||
// Status is the status of RawConfigTrafficController. | ||
Status struct { | ||
HTTPServers map[string]interface{} `yaml:"httpServers"` | ||
HTTPipelines map[string]interface{} `yaml:"httpPipelines"` | ||
} | ||
Status = trafficcontroller.StatusOneSpace | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||
) | ||
|
||
func init() { | ||
|
@@ -187,20 +184,20 @@ func (rctc *RawConfigTrafficController) handleEvent(event *supervisor.ObjectEnti | |
// Status returns the status of RawConfigTrafficController. | ||
func (rctc *RawConfigTrafficController) Status() *supervisor.Status { | ||
status := &Status{ | ||
HTTPServers: make(map[string]interface{}), | ||
HTTPipelines: make(map[string]interface{}), | ||
Namespace: rctc.namespace, | ||
HTTPServers: make(map[string]*httpserver.Status), | ||
HTTPPipelines: make(map[string]*httppipeline.Status), | ||
} | ||
|
||
servers := rctc.tc.ListHTTPServers(rctc.namespace) | ||
pipelines := rctc.tc.ListHTTPPipelines(rctc.namespace) | ||
|
||
for _, entity := range servers { | ||
status.HTTPServers[entity.Spec().Name()] = entity.Instance().Status().ObjectStatus | ||
} | ||
rctc.tc.WalkHTTPServers(rctc.namespace, func(entity *supervisor.ObjectEntity) bool { | ||
status.HTTPServers[entity.Spec().Name()] = entity.Instance().Status().ObjectStatus.(*httpserver.Status) | ||
return true | ||
}) | ||
|
||
for _, entity := range pipelines { | ||
status.HTTPipelines[entity.Spec().Name()] = entity.Instance().Status().ObjectStatus | ||
} | ||
rctc.tc.WalkHTTPPipelines(rctc.namespace, func(entity *supervisor.ObjectEntity) bool { | ||
status.HTTPPipelines[entity.Spec().Name()] = entity.Instance().Status().ObjectStatus.(*httppipeline.Status) | ||
return true | ||
}) | ||
|
||
return &supervisor.Status{ | ||
ObjectStatus: status, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filter reference needs to be updated accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been updated already. This is a legacy typo.