MCPcopy Create free account
hub / github.com/convox/rack / Proxy

Method Proxy

pkg/api/controllers.go:870–893  ·  view source on GitHub ↗
(c *stdapi.Context)

Source from the content-addressed store, hash-verified

868}
869
870func (s *Server) Proxy(c *stdapi.Context) error {
871 if err := s.hook("ProxyValidate", c); err != nil {
872 return err
873 }
874
875 host := c.Var("host")
876
877 port, cerr := strconv.Atoi(c.Var("port"))
878 if cerr != nil {
879 return cerr
880 }
881
882 var opts structs.ProxyOptions
883 if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil {
884 return err
885 }
886
887 err := s.provider(c).WithContext(c.Context()).Proxy(host, port, stdsdk.NewAdapterWs(c.Websocket()), opts)
888 if err != nil {
889 return err
890 }
891
892 return nil
893}
894
895func (s *Server) RegistryAdd(c *stdapi.Context) error {
896 if err := s.hook("RegistryAddValidate", c); err != nil {

Callers

nothing calls this directly

Calls 7

hookMethod · 0.95
providerMethod · 0.95
RequestMethod · 0.80
ContextMethod · 0.80
WebsocketMethod · 0.80
ProxyMethod · 0.65
WithContextMethod · 0.65

Tested by

no test coverage detected