MCPcopy Index your code
hub / github.com/Monibuca/engine / API_closeStream

Method API_closeStream

http.go:65–76  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

63}
64
65func (conf *GlobalConfig) API_closeStream(w http.ResponseWriter, r *http.Request) {
66 if streamPath := r.URL.Query().Get("streamPath"); streamPath != "" {
67 if s := Streams.Get(streamPath); s != nil {
68 s.Close()
69 util.ReturnOK(w, r)
70 } else {
71 util.ReturnError(util.APIErrorNoStream, NO_SUCH_STREAM, w, r)
72 }
73 } else {
74 util.ReturnError(util.APIErrorNoStream, "no streamPath", w, r)
75 }
76}
77
78// API_getConfig 获取指定的配置信息
79func (conf *GlobalConfig) API_getConfig(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 4

ReturnOKFunction · 0.92
ReturnErrorFunction · 0.92
CloseMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected