func (st *state) ConnectControllerStream(path string, attrs url.Values, headers http.Header) (base.Stream, error) {
	if !strings.HasPrefix(path, "/") {
		return nil, errors.Errorf("path %q is not absolute", path)
	}
	if strings.HasPrefix(path, modelRoot) {
		return nil, errors.Errorf("path %q is model-specific", path)
	}
	conn, err := st.connectStreamWithRetry(path, attrs, headers)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return conn, nil
}
// ConnectControllerStream creates a stream connection to an API path
// that isn't prefixed with /model/uuid - the target model (if the
// endpoint needs one) can be specified in the headers. The stream
// returned will apply a 30-second write deadline, so WriteJSON should
// only be called from one goroutine.
ConnectControllerStream creates a stream connection to an API path
that isn't prefixed with /model/uuid - the target model (if the
endpoint needs one) can be specified in the headers. The stream
returned will apply a 30-second write deadline, so WriteJSON should
only be called from one goroutine.
// ConnectControllerStream creates a stream connection to an API path // that isn ' t prefixed with / model / uuid - the target model ( if the // endpoint needs one ) can be specified in the headers . The stream // returned will apply a 30 - second write deadline so WriteJSON should // only be called from one goroutine .
func (st *state) ConnectControllerStream(path string, attrs url.Values, headers http.Header) (base.Stream, error) {
	if !strings.HasPrefix(path, "/") {
		return nil, errors.Errorf("path %q is not absolute", path)
	}
	if strings.HasPrefix(path, modelRoot) {
		return nil, errors.Errorf("path %q is model-specific", path)
	}
	conn, err := st.connectStreamWithRetry(path, attrs, headers)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return conn, nil
}
func ( st * state ) ConnectControllerStream ( path string , attrs url . Values , headers http . Header ) ( base . Stream , error ) { if ! strings . HasPrefix ( path , " " ) { return nil , errors . Errorf ( " " , path ) } if strings . HasPrefix ( path , modelRoot ) { return nil , errors . Errorf ( " " , path ) } conn , err := st . connectStreamWithRetry ( path , attrs , headers ) if err != nil { return nil , errors . Trace ( err ) } return conn , nil }
ConnectControllerStream creates a stream connection to an API path
that isn't prefixed with /model/uuid - the target model (if the
endpoint needs one) can be specified in the headers.
ConnectControllerStream creates a stream connection to an API path that isn ' t prefixed with / model / uuid - the target model ( if the endpoint needs one ) can be specified in the headers .