Documentation
¶
Index ¶
- Variables
- type AppSource
- type AppSourceVKRouter
- func (a *AppSourceVKRouter) AuthenticationHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) ConnectionsHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) FileHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) FindRunnableHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) GenerateRouter() (*vk.Router, error)
- func (a *AppSourceVKRouter) HandlersHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) MetaHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) RunnablesHandler() vk.HandlerFunc
- func (a *AppSourceVKRouter) SchedulesHandler() vk.HandlerFunc
- type BundleSource
- func (b *BundleSource) Authentication() directive.Authentication
- func (b *BundleSource) Connections() directive.Connections
- func (b *BundleSource) File(filename string) ([]byte, error)
- func (b *BundleSource) FindRunnable(fqfn string) (*directive.Runnable, error)
- func (b *BundleSource) Handlers() []directive.Handler
- func (b *BundleSource) Meta() Meta
- func (b *BundleSource) Runnables() []directive.Runnable
- func (b *BundleSource) Schedules() []directive.Schedule
- func (b *BundleSource) Start(opts options.Options) error
- type HTTPSource
- func (h *HTTPSource) Authentication() directive.Authentication
- func (h *HTTPSource) Connections() directive.Connections
- func (h *HTTPSource) File(filename string) ([]byte, error)
- func (h *HTTPSource) FindRunnable(FQFN string) (*directive.Runnable, error)
- func (h *HTTPSource) Handlers() []directive.Handler
- func (h *HTTPSource) Meta() Meta
- func (h *HTTPSource) Runnables() []directive.Runnable
- func (h *HTTPSource) Schedules() []directive.Schedule
- func (h *HTTPSource) Start(opts options.Options) error
- type HeadlessBundleSource
- func (b *HeadlessBundleSource) Authentication() directive.Authentication
- func (h *HeadlessBundleSource) Connections() directive.Connections
- func (h *HeadlessBundleSource) File(filename string) ([]byte, error)
- func (h *HeadlessBundleSource) FindRunnable(fqfn string) (*directive.Runnable, error)
- func (h *HeadlessBundleSource) Handlers() []directive.Handler
- func (h *HeadlessBundleSource) Meta() Meta
- func (h *HeadlessBundleSource) Runnables() []directive.Runnable
- func (h *HeadlessBundleSource) Schedules() []directive.Schedule
- func (h *HeadlessBundleSource) Start(opts options.Options) error
- type Meta
Constants ¶
This section is empty.
Variables ¶
var ErrRunnableNotFound = errors.New("failed to find requested Runnable")
Functions ¶
This section is empty.
Types ¶
type AppSource ¶
type AppSource interface {
// Start indicates to the AppSource that it should prepare for app startup
Start(options.Options) error
// Runnables returns all of the available Runnables
Runnables() []directive.Runnable
// FindRunnable directs the AppSource to attempt to find
// a particular Runnable and make it available at next
// AppSource state sync via a call to Runnables().
// ErrRunnableNotFound should be returned if the Runnable cannot be found.
FindRunnable(string) (*directive.Runnable, error)
// Handlers returns the handlers for the app
Handlers() []directive.Handler
// Schedules returns the requested schedules for the app
Schedules() []directive.Schedule
// Connections returns the connections needed for the app
Connections() directive.Connections
// Authentication provides any auth headers or metadata for the app
Authentication() directive.Authentication
// File is a source of files for the Runnables
// TODO: refactor this into a set of capabilities / profiles
File(string) ([]byte, error)
// Meta returns metadata about the app
Meta() Meta
}
func NewBundleSource ¶
NewBundleSource creates a new BundleSource that looks for a bundle at path
func NewHTTPSource ¶
NewHTTPSource creates a new HTTPSource that looks for a bundle at [host]
func NewHeadlessBundleSource ¶
NewHeadlessBundleSource creates a new HeadlessBundleSource that looks for a bundle at path
type AppSourceVKRouter ¶
type AppSourceVKRouter struct {
// contains filtered or unexported fields
}
AppSourceVKRouter is a helper struct to generate a VK router that can serve an HTTP AppSource based on an actual AppSource object
func NewAppSourceVKRouter ¶
func NewAppSourceVKRouter(appSource AppSource, opts options.Options) *AppSourceVKRouter
NewAppSourceVKRouter creates a new AppSourceVKRouter
func (*AppSourceVKRouter) AuthenticationHandler ¶ added in v0.3.1
func (a *AppSourceVKRouter) AuthenticationHandler() vk.HandlerFunc
AuthenticationHandler is a handler to fetch Authentication data
func (*AppSourceVKRouter) ConnectionsHandler ¶ added in v0.3.1
func (a *AppSourceVKRouter) ConnectionsHandler() vk.HandlerFunc
ConnectionsHandler is a handler to fetch Connection data
func (*AppSourceVKRouter) FileHandler ¶
func (a *AppSourceVKRouter) FileHandler() vk.HandlerFunc
FileHandler is a handler to fetch Files
func (*AppSourceVKRouter) FindRunnableHandler ¶
func (a *AppSourceVKRouter) FindRunnableHandler() vk.HandlerFunc
FindRunnableHandler is a handler to find a single Runnable
func (*AppSourceVKRouter) GenerateRouter ¶
func (a *AppSourceVKRouter) GenerateRouter() (*vk.Router, error)
GenerateRouter generates a VK router that uses an AppSource to serve data
func (*AppSourceVKRouter) HandlersHandler ¶
func (a *AppSourceVKRouter) HandlersHandler() vk.HandlerFunc
HandlersHandler is a handler to fetch Handlers
func (*AppSourceVKRouter) MetaHandler ¶
func (a *AppSourceVKRouter) MetaHandler() vk.HandlerFunc
MetaHandler is a handler to fetch Metadata
func (*AppSourceVKRouter) RunnablesHandler ¶
func (a *AppSourceVKRouter) RunnablesHandler() vk.HandlerFunc
RunnablesHandler is a handler to fetch Runnables
func (*AppSourceVKRouter) SchedulesHandler ¶
func (a *AppSourceVKRouter) SchedulesHandler() vk.HandlerFunc
SchedulesHandler is a handler to fetch Schedules
type BundleSource ¶
type BundleSource struct {
// contains filtered or unexported fields
}
BundleSource is an AppSource backed by a bundle file
func (*BundleSource) Authentication ¶ added in v0.3.1
func (b *BundleSource) Authentication() directive.Authentication
Authentication returns the Authentication for the app
func (*BundleSource) Connections ¶ added in v0.3.1
func (b *BundleSource) Connections() directive.Connections
Connections returns the Connections for the app
func (*BundleSource) File ¶
func (b *BundleSource) File(filename string) ([]byte, error)
File returns a requested file
func (*BundleSource) FindRunnable ¶
func (b *BundleSource) FindRunnable(fqfn string) (*directive.Runnable, error)
FindRunnable searches for and returns the requested runnable otherwise ErrRunnableNotFound
func (*BundleSource) Handlers ¶
func (b *BundleSource) Handlers() []directive.Handler
Handlers returns the handlers for the app
func (*BundleSource) Meta ¶
func (b *BundleSource) Meta() Meta
func (*BundleSource) Runnables ¶
func (b *BundleSource) Runnables() []directive.Runnable
Runnables returns the Runnables for the app
func (*BundleSource) Schedules ¶
func (b *BundleSource) Schedules() []directive.Schedule
Schedules returns the schedules for the app
type HTTPSource ¶
type HTTPSource struct {
// contains filtered or unexported fields
}
HTTPSource is an AppSource backed by an HTTP client connected to a remote source
func (*HTTPSource) Authentication ¶ added in v0.3.1
func (h *HTTPSource) Authentication() directive.Authentication
Authentication returns the Authentication for the app
func (*HTTPSource) Connections ¶ added in v0.3.1
func (h *HTTPSource) Connections() directive.Connections
Connections returns the Connections for the app
func (*HTTPSource) File ¶
func (h *HTTPSource) File(filename string) ([]byte, error)
File returns a requested file
func (*HTTPSource) FindRunnable ¶
func (h *HTTPSource) FindRunnable(FQFN string) (*directive.Runnable, error)
FindRunnable returns a nil error if a Runnable with the provided FQFN can be made available at the next sync, otherwise ErrRunnableNotFound is returned
func (*HTTPSource) Handlers ¶
func (h *HTTPSource) Handlers() []directive.Handler
Handlers returns the handlers for the app
func (*HTTPSource) Meta ¶
func (h *HTTPSource) Meta() Meta
func (*HTTPSource) Runnables ¶
func (h *HTTPSource) Runnables() []directive.Runnable
Runnables returns the Runnables for the app
func (*HTTPSource) Schedules ¶
func (h *HTTPSource) Schedules() []directive.Schedule
Schedules returns the schedules for the app
type HeadlessBundleSource ¶
type HeadlessBundleSource struct {
// contains filtered or unexported fields
}
HeadlessBundleSource is an AppSource backed by a bundle file (but headless)
func (*HeadlessBundleSource) Authentication ¶ added in v0.3.1
func (b *HeadlessBundleSource) Authentication() directive.Authentication
Authentication returns the Authentication for the app
func (*HeadlessBundleSource) Connections ¶ added in v0.3.1
func (h *HeadlessBundleSource) Connections() directive.Connections
Connections returns the Connections for the app
func (*HeadlessBundleSource) File ¶
func (h *HeadlessBundleSource) File(filename string) ([]byte, error)
File returns a requested file
func (*HeadlessBundleSource) FindRunnable ¶
func (h *HeadlessBundleSource) FindRunnable(fqfn string) (*directive.Runnable, error)
FindRunnable returns a nil error if a Runnable with the provided FQFN can be made available at the next sync, otherwise ErrRunnableNotFound is returned
func (*HeadlessBundleSource) Handlers ¶
func (h *HeadlessBundleSource) Handlers() []directive.Handler
Handlers returns the handlers for the app
func (*HeadlessBundleSource) Meta ¶
func (h *HeadlessBundleSource) Meta() Meta
func (*HeadlessBundleSource) Runnables ¶
func (h *HeadlessBundleSource) Runnables() []directive.Runnable
Runnables returns the Runnables for the app
func (*HeadlessBundleSource) Schedules ¶
func (h *HeadlessBundleSource) Schedules() []directive.Schedule
Schedules returns the schedules for the app