Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { GetAll(ctx context.Context) ([]models.Item, error) GetStories(ctx context.Context) ([]models.Item, error) GetJobs(ctx context.Context) ([]models.Item, error) }
Cache is an interace to expose cache methods
type CacheOption ¶
type CacheOption func(c *itemCache)
CacheOption is an interface for a functional option
func WithTTL ¶
func WithTTL(ttl time.Duration) CacheOption
WithTTL is a functional option to configure the cache TTL
type Handler ¶
type Handler struct { pb.UnimplementedAPIServer Cache Cache }
Handler contains the endpoint handlers
func (Handler) ListStories ¶
ListStories streams a collection of story items to a client
Click to show internal directories.
Click to hide internal directories.