Documentation
¶
Index ¶
Constants ¶
View Source
const (
ValueChangedTopic = "app-template.value.changed"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { // PreStart called before the service is started, register http endpoints etc. here PreStart() error // PostStart called after the service has started, run any background processes etc. here PostStart() error // PreStop called before the service shuts down, use this to gracefully stop your service PreStop() error }
App contract for the app entry point
type AppEventManager ¶
type AppEventManager interface { DispatchValueChangedEvent(ctx context.Context, value string) error SubscribeToValueChanges(ctx context.Context) (eventCh chan string, close func(), err error) }
AppEventManager handles applications events
type AppService ¶
type AppService interface { GQLSetValue(ctx context.Context, input model.ValueInput) (*model.ValueOutput, error) GQLGetValue(ctx context.Context) (*model.ValueOutput, error) GQLSubscribeToValueChanges(ctx context.Context) (<-chan *model.ValueOutput, error) }
AppService contract for graphql handlers and other app specific business logic
type Option ¶
type Option func(o *Options)
func WithConfig ¶
func WithService ¶
func WithService(svc *service.AppService) Option
type Options ¶
type Options struct { Config *Config Service *service.AppService }
Click to show internal directories.
Click to hide internal directories.