コード例 #1
0
func (pi *PacketInjectorApi) registerEndpoints(r *shttp.Server) {
	routes := []shttp.Route{
		{
			"InjectPacket",
			"POST",
			"/api/injectpacket",
			pi.injectPacket,
		},
	}

	r.RegisterRoutes(routes)
}
コード例 #2
0
ファイル: topology.go プロジェクト: skydive-project/skydive
func (t *TopologyApi) registerEndpoints(r *shttp.Server) {
	routes := []shttp.Route{
		{
			"TopologiesIndex",
			"GET",
			"/api/topology",
			t.topologyIndex,
		},
		{
			"TopologiesSearch",
			"POST",
			"/api/topology",
			t.topologySearch,
		},
	}

	r.RegisterRoutes(routes)
}
コード例 #3
0
ファイル: flow.go プロジェクト: skydive-project/skydive
func (f *FlowApi) registerEndpoints(r *shttp.Server) {
	routes := []shttp.Route{
		{
			"FlowSearch",
			"GET",
			"/api/flow/search",
			f.flowSearch,
		},
		{
			"ConversationLayer",
			"GET",
			"/api/flow/conversation/{layer}",
			f.conversationLayer,
		},
		{
			"Discovery",
			"GET",
			"/api/flow/discovery/{type}",
			f.discoveryType,
		},
	}

	r.RegisterRoutes(routes)
}