Documentation ¶
Index ¶
- type FaaSManager
- type WebsocketFaas
- type WebsocketManager
- func (m *WebsocketManager) Get(id string) (faascommon.FaaSInstance, error)
- func (m *WebsocketManager) GetFaas(w http.ResponseWriter, r *http.Request)
- func (m *WebsocketManager) HandleBreakSocket(remoteAddr string) error
- func (m *WebsocketManager) HandleEvent(event faascommon.Event, ws *websocket.Conn) error
- func (m *WebsocketManager) Index(w http.ResponseWriter, r *http.Request)
- func (m *WebsocketManager) List() map[string]faascommon.FaaSInstance
- func (m *WebsocketManager) ListFaas(w http.ResponseWriter, r *http.Request)
- func (m *WebsocketManager) Message(w http.ResponseWriter, r *http.Request)
- func (m *WebsocketManager) Register(id string, faas faascommon.FaaSInstance) error
- func (m *WebsocketManager) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (m *WebsocketManager) Start(basepath string) error
- func (m *WebsocketManager) UnRegister(id string) error
- func (m *WebsocketManager) Upper(ws *websocket.Conn)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FaaSManager ¶
type FaaSManager interface { //Start(basepath ) error ServeHTTP(w http.ResponseWriter, r *http.Request) }
type WebsocketFaas ¶
type WebsocketFaas struct { FaasSpec faascommon.FaaSSpec Connection *websocket.Conn ConnectionStatus string }
func NewWebsocketFaas ¶
func NewWebsocketFaas(spec faascommon.FaaSSpec, ws *websocket.Conn) *WebsocketFaas
func (*WebsocketFaas) Info ¶
func (f *WebsocketFaas) Info() string
func (*WebsocketFaas) Recv ¶
func (f *WebsocketFaas) Recv() (faascommon.Event, error)
func (*WebsocketFaas) Send ¶
func (f *WebsocketFaas) Send(event faascommon.Event) error
func (*WebsocketFaas) Spec ¶
func (f *WebsocketFaas) Spec() faascommon.FaaSSpec
func (*WebsocketFaas) Status ¶
func (f *WebsocketFaas) Status() string
type WebsocketManager ¶
type WebsocketManager struct { Name string Router *mux.Router Option *options.HermesOption FaaSInstances map[string]faascommon.FaaSInstance WebsocketIndex map[string]string // this map is used to find faas instance from websocket remoteAddr FunctionManager function.FunctionManager FaasMux sync.Mutex FaasProxy *httputil.ReverseProxy }
func NewWebsocketManager ¶
func NewWebsocketManager(name string, option *options.HermesOption) *WebsocketManager
func (*WebsocketManager) Get ¶
func (m *WebsocketManager) Get(id string) (faascommon.FaaSInstance, error)
func (*WebsocketManager) GetFaas ¶
func (m *WebsocketManager) GetFaas(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) HandleBreakSocket ¶
func (m *WebsocketManager) HandleBreakSocket(remoteAddr string) error
func (*WebsocketManager) HandleEvent ¶
func (m *WebsocketManager) HandleEvent(event faascommon.Event, ws *websocket.Conn) error
Note: handle event return error will break the websocket connection
func (*WebsocketManager) Index ¶
func (m *WebsocketManager) Index(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) List ¶
func (m *WebsocketManager) List() map[string]faascommon.FaaSInstance
func (*WebsocketManager) ListFaas ¶
func (m *WebsocketManager) ListFaas(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) Message ¶
func (m *WebsocketManager) Message(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) Register ¶
func (m *WebsocketManager) Register(id string, faas faascommon.FaaSInstance) error
func (*WebsocketManager) ServeHTTP ¶
func (m *WebsocketManager) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*WebsocketManager) Start ¶
func (m *WebsocketManager) Start(basepath string) error
func (*WebsocketManager) UnRegister ¶
func (m *WebsocketManager) UnRegister(id string) error
func (*WebsocketManager) Upper ¶
func (m *WebsocketManager) Upper(ws *websocket.Conn)
Click to show internal directories.
Click to hide internal directories.