MCPcopy
hub / github.com/istio/istio / registerTopic

Function registerTopic

pkg/ctrlz/ctrlz.go:73–79  ·  view source on GitHub ↗
(router *mux.Router, layout *template.Template, t fw.Topic)

Source from the content-addressed store, hash-verified

71}
72
73func registerTopic(router *mux.Router, layout *template.Template, t fw.Topic) {
74 htmlRouter := router.NewRoute().PathPrefix("/" + t.Prefix() + "z").Subrouter()
75 jsonRouter := router.NewRoute().PathPrefix("/" + t.Prefix() + "j").Subrouter()
76
77 tmpl := template.Must(template.Must(layout.Clone()).Parse("{{ define \"title\" }}" + t.Title() + "{{ end }}"))
78 t.Activate(fw.NewContext(htmlRouter, jsonRouter, tmpl))
79}
80
81// getLocalIP returns a non loopback local IP of the host
82func getLocalIP() string {

Callers 1

RunFunction · 0.85

Calls 5

NewContextFunction · 0.92
PrefixMethod · 0.65
TitleMethod · 0.65
ActivateMethod · 0.65
CloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…