Documentation ¶
Index ¶
- Variables
- func ClientInitialize()
- func HandleResponse(session *clientpb.Session, resp *transport.GenericHTTPResponse)
- func Initialize()
- func ShortID(uuid string) string
- type Claims
- type HTTPSession
- type Handler
- func (h *Handler) AwaitResponse(sessionID int) *transport.GenericHTTPResponse
- func (h *Handler) IsActive() bool
- func (h *Handler) IsActiveTLS() bool
- func (h *Handler) NewSession(agent *db.Agent, isTCP bool, connectInfo *transport.Registration) (string, time.Time, int, error)
- func (h *Handler) QueueRequest(sessionID int, req *transport.GenericHTTPRequest) error
- func (h *Handler) RmSession(sessID int)
- func (h *Handler) Serve()
- func (h *Handler) ServeTLS()
- func (h *Handler) SessionByID(sessID int) *HTTPSession
- func (h *Handler) Sessions(sessIDs []int) []*HTTPSession
- func (h *Handler) Stop() error
- func (h *Handler) StopTLS() error
- type RequestQueue
- type ResponseQueue
- type SessionStatus
- type StageItem
Constants ¶
This section is empty.
Variables ¶
View Source
var Stage *stage
Functions ¶
func ClientInitialize ¶
func ClientInitialize()
func HandleResponse ¶
func HandleResponse(session *clientpb.Session, resp *transport.GenericHTTPResponse)
func Initialize ¶
func Initialize()
Types ¶
type HTTPSession ¶
type Handler ¶
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) AwaitResponse ¶
func (h *Handler) AwaitResponse(sessionID int) *transport.GenericHTTPResponse
func (*Handler) IsActiveTLS ¶
func (*Handler) NewSession ¶
func (*Handler) QueueRequest ¶
func (h *Handler) QueueRequest(sessionID int, req *transport.GenericHTTPRequest) error
func (*Handler) RmSession ¶
RmSession removes a session in special cases, such as if it dies unexpectedly
func (*Handler) SessionByID ¶
func (h *Handler) SessionByID(sessID int) *HTTPSession
SessionByID retrieves an active HTTP connection with an agent, if said agent has ever had an active session
func (*Handler) Sessions ¶
func (h *Handler) Sessions(sessIDs []int) []*HTTPSession
type RequestQueue ¶
type RequestQueue struct { // expose for TCP Channel chan *transport.GenericHTTPRequest }
RequestQueue holds up to queueCapacity responses for a callback. If full, an error is raised.
func NewRequestQueue ¶
func NewRequestQueue() *RequestQueue
func (*RequestQueue) Dequeue ¶
func (r *RequestQueue) Dequeue() interface{}
func (*RequestQueue) Enqueue ¶
func (r *RequestQueue) Enqueue(req interface{}) error
func (*RequestQueue) Size ¶
func (r *RequestQueue) Size() int
type ResponseQueue ¶
type ResponseQueue struct {
// contains filtered or unexported fields
}
func NewResponseQueue ¶
func NewResponseQueue() *ResponseQueue
func (*ResponseQueue) Dequeue ¶
func (r *ResponseQueue) Dequeue() interface{}
func (*ResponseQueue) Enqueue ¶
func (r *ResponseQueue) Enqueue(req interface{}) error
func (*ResponseQueue) Size ¶
func (r *ResponseQueue) Size() int
type SessionStatus ¶
type SessionStatus string
const ( StatusActive SessionStatus = "active" StatusInactive SessionStatus = "inactive" StatusKilled SessionStatus = "killed" )
Click to show internal directories.
Click to hide internal directories.