Documentation ¶
Index ¶
Constants ¶
View Source
const CLIENT_ID = "api"
View Source
const REALM = "coophive"
Variables ¶
This section is empty.
Functions ¶
func StartWebSocketServer ¶
func StartWebSocketServer( ctx context.Context, r *mux.Router, path string, jobUpdatesChan chan *types.Job, getUserIDFromRequest GetUserIDFromRequest, )
StartWebSocketServer starts a WebSocket server
Types ¶
type ConnectionWrapper ¶
type ConnectionWrapper struct {
// contains filtered or unexported fields
}
type CoopSaaSAPIServer ¶
type CoopSaaSAPIServer struct { Options ServerOptions Store store.Store Controller *controller.Controller }
func NewServer ¶
func NewServer( options ServerOptions, store store.Store, controller *controller.Controller, ) (*CoopSaaSAPIServer, error)
func (*CoopSaaSAPIServer) ListenAndServe ¶
func (apiServer *CoopSaaSAPIServer) ListenAndServe(ctx context.Context, cm *system.CleanupManager) error
type RunJobResults ¶
type RunJobResults struct { JobOffer data.JobOfferContainer `json:"job_offer"` Result data.Result `json:"result"` }
type ServerOptions ¶
type ServerOptions struct { URL string Host string Port int KeyCloakURL string KeyCloakToken string // this is for when we are running localfs filesystem // and we need to add a route to view files based on their path // we are assuming all file storage is open right now // so we just deep link to the object path and don't apply auth // (this is so coophive nodes can see files) // later, we might add a token to the URLs LocalFilestorePath string }
Click to show internal directories.
Click to hide internal directories.