Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App interface { Migrations() []string Transactions() map[string]store.TxHandler Public(store *store.Store) http.Handler Private(store *store.Store) http.Handler Log() *slog.Logger }
App provides an application's logic to a service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a libsdk service which contains public and private servers, a fabric, and a store for simple service development.
func NewWithFabricStore ¶
NewWithFabricStore creates a Service with the provided fabric and store.
func (*Service) Serve ¶
Serve takes in an App definition and begins serving the public and private handlers. - App's public handler is served on an HTTP port defined by LIBSDK_PUBLIC_PORT, defaulting to :8080 - App's private handler is served using the configured fabric. - App's transaction handlers are registered for use by the store. - App's migrations are applied to the store before replaying transactions.
Click to show internal directories.
Click to hide internal directories.