Documentation ¶
Overview ¶
Copyright (c) 2019 the Octant contributors. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2019 the Octant contributors. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0
Index ¶
- type ActionDispatcher
- type ClientManager
- type OctantClient
- type StateManager
- type StreamRequest
- type StreamingClient
- type StreamingClientFactory
- type StreamingConnectionManager
- func (m *StreamingConnectionManager) ActionDispatcher() ActionDispatcher
- func (m *StreamingConnectionManager) ClientFromRequest(dashConfig config.Dash, w http.ResponseWriter, r *http.Request) (StreamingClient, error)
- func (m *StreamingConnectionManager) Clients() []StreamingClient
- func (m *StreamingConnectionManager) Context() context.Context
- func (m *StreamingConnectionManager) Get(id string) event.WSEventSender
- func (m *StreamingConnectionManager) Run(ctx context.Context)
- func (m *StreamingConnectionManager) TemporaryClientFromLoadingRequest(w http.ResponseWriter, r *http.Request) (StreamingClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionDispatcher ¶
type ActionDispatcher interface {
Dispatch(ctx context.Context, alerter action.Alerter, actionName string, payload action.Payload) error
}
ActionDispatcher dispatches actions.
type ClientManager ¶
type ClientManager interface { Run(ctx context.Context) Clients() []StreamingClient ClientFromRequest(dashConfig config.Dash, w http.ResponseWriter, r *http.Request) (StreamingClient, error) TemporaryClientFromLoadingRequest(w http.ResponseWriter, r *http.Request) (StreamingClient, error) Get(id string) event.WSEventSender Context() context.Context ActionDispatcher() ActionDispatcher }
ClientManager is an interface for managing clients.
type OctantClient ¶
OctantClient is the interface responsible for sending streaming data to a users session, usually in a browser.
type StateManager ¶
type StateManager interface { Handlers() []octant.ClientRequestHandler Start(ctx context.Context, state octant.State, s OctantClient) }
StateManager manages states for WebsocketState.
type StreamRequest ¶
type StreamingClient ¶
type StreamingClient interface { OctantClient Receive() (StreamRequest, error) Handlers() map[string][]octant.ClientRequestHandler State() octant.State }
StreamingClient is the interface responsible for sending and receiving streaming data to a users session, usually in a browser.
type StreamingClientFactory ¶
type StreamingClientFactory interface { NewConnection(http.ResponseWriter, *http.Request, ClientManager, config.Dash) (StreamingClient, context.CancelFunc, error) NewTemporaryConnection(http.ResponseWriter, *http.Request, ClientManager) (StreamingClient, context.CancelFunc, error) }
type StreamingConnectionManager ¶
type StreamingConnectionManager struct {
// contains filtered or unexported fields
}
StreamingConnectionManager is a client manager for streams.
func NewStreamingConnectionManager ¶
func NewStreamingConnectionManager(ctx context.Context, dispatcher ActionDispatcher, clientFactory StreamingClientFactory) *StreamingConnectionManager
NewStreamingConnectionManager creates an instance of WebsocketClientManager.
func (*StreamingConnectionManager) ActionDispatcher ¶
func (m *StreamingConnectionManager) ActionDispatcher() ActionDispatcher
func (*StreamingConnectionManager) ClientFromRequest ¶
func (m *StreamingConnectionManager) ClientFromRequest(dashConfig config.Dash, w http.ResponseWriter, r *http.Request) (StreamingClient, error)
ClientFromRequest creates a websocket client from a http request.
func (*StreamingConnectionManager) Clients ¶
func (m *StreamingConnectionManager) Clients() []StreamingClient
func (*StreamingConnectionManager) Context ¶
func (m *StreamingConnectionManager) Context() context.Context
func (*StreamingConnectionManager) Get ¶
func (m *StreamingConnectionManager) Get(id string) event.WSEventSender
func (*StreamingConnectionManager) Run ¶
func (m *StreamingConnectionManager) Run(ctx context.Context)
Run runs the manager. It manages multiple websocket clients.
func (*StreamingConnectionManager) TemporaryClientFromLoadingRequest ¶
func (m *StreamingConnectionManager) TemporaryClientFromLoadingRequest(w http.ResponseWriter, r *http.Request) (StreamingClient, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package fake is a generated GoMock package.
|
Package fake is a generated GoMock package. |