Documentation ¶
Index ¶
- Constants
- func Failed(c *gin.Context, msg string)
- func GetCacheKey(namespace, name string, target requestTarget) string
- func GetProxyCacheKey(namespace, name string, target proxyGroupType) string
- func InitJobMetaObjectByKind(kind string) metav1.Object
- func InitJobRuntimeObjectByKind(kind string) client.Object
- func IsDomainNameAvailable(domain string) bool
- func NewKubeflowProxy() (*httputil.ReverseProxy, error)
- func NewMlflowProxy() (*httputil.ReverseProxy, error)
- func Param(c *gin.Context, param string) string
- func Query(c *gin.Context, param string) string
- func Redirect1000(c *gin.Context)
- func Redirect403(c *gin.Context)
- func Redirect404(c *gin.Context)
- func Redirect500(c *gin.Context)
- func RedirectTo(c *gin.Context, redirectTarget string)
- func RequestWithHeader(method string, reqUrl string, header map[string]string, ...) (status int, body string, err error)
- func RequestWithPost(reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
- func RuntimeObjToMetaObj(obj runtime.Object) (metaObj metav1.Object, ok bool)
- func Succeed(c *gin.Context, obj interface{})
- func TimeTransform(from, to string) (fromTime, toTime time.Time, err error)
Constants ¶
View Source
const ( NotebookPod requestTarget = "pod" NotebookSvc requestTarget = "svc" JupyterProxy proxyGroupType = "notebook" VSCodeProxy proxyGroupType = "vscode" StableDiffusionProxy proxyGroupType = "sd" CommonPortProxy proxyGroupType = "common" )
Variables ¶
This section is empty.
Functions ¶
func GetCacheKey ¶
func GetProxyCacheKey ¶
func InitJobMetaObjectByKind ¶
func IsDomainNameAvailable ¶
func NewKubeflowProxy ¶
func NewKubeflowProxy() (*httputil.ReverseProxy, error)
func NewMlflowProxy ¶
func NewMlflowProxy() (*httputil.ReverseProxy, error)
func Redirect1000 ¶
func Redirect403 ¶
func Redirect404 ¶
func Redirect500 ¶
func RedirectTo ¶
func RequestWithHeader ¶
func RequestWithHeader(method string, reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
RequestWithHeader is a http client with header, url, and params
func RequestWithPost ¶
func RequestWithPost(reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
RequestWithPost is a http client with url, header and params
func RuntimeObjToMetaObj ¶
func TimeTransform ¶
TimeTransform transforms from-time and to-time from string to a Time instance formatted in RFC3339. Considering time differences between log-timestamp and job-timestamp, we shift 1h earlier for from-time and postpone 1h for to-time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.