common

package
v0.0.0-...-23ee483 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserConnection

type BrowserConnection struct {
	Id                       string                         // browser connection id
	SessionToken             string                         // session token of this connection
	Context                  context.Context                // browser connection context
	ActiveSubscriptions      map[string]GraphQlSubscription // active subscriptions of this connection (start, but no stop)
	ActiveSubscriptionsMutex sync.Mutex                     // mutex to control the map usage
	ConnectionInitMessage    interface{}                    // init message received in this connection (to be used on hasura reconnect)
	HasuraConnection         *HasuraConnection              // associated hasura connection
	Disconnected             bool                           // indicate if the connection is gone
}

type GraphQlSubscription

type GraphQlSubscription struct {
	Id                        string
	Message                   interface{}
	LastSeenOnHasuraConnetion string // id of the hasura connection that this query was active
}

type HasuraConnection

type HasuraConnection struct {
	Id                string             // hasura connection id
	Browserconn       *BrowserConnection // browser connection that originated this hasura connection
	Websocket         *websocket.Conn    // websocket used to connect to hasura
	Context           context.Context    // hasura connection context (child of browser connection context)
	ContextCancelFunc context.CancelFunc // function to cancel the hasura context (and so, the hasura connection)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL