Documentation
¶
Index ¶
- Constants
- func LiveReplyChecksFromEnv() (int, error)
- func NewAPI(ctx context.Context, logger zerolog.Logger, cache kv.Store, options ...Option) (*api, error)
- type Option
- func WithAccounts(config accounts.Config, service *accounts.Service) Option
- func WithAgentDrafts(repository drafts.Repository) Option
- func WithDiscovery(service *discovery.Service) Option
- func WithDiscussionFollows(repository discussionfollows.Repository) Option
- func WithEventActivity(repository eventactivity.Repository) Option
- func WithEventDiscussions(repository discussions.Repository) Option
- func WithEventInterests(repository interests.Repository) Option
- func WithEventRecommendations(repository recommendations.Repository) Option
- func WithFollows(repository follows.Repository) Option
- func WithLiveActivity(service *activity.Service, starts int) Option
- func WithLiveReplyChecks(perMinute int) Option
- func WithLocation(resolver *location.Resolver) Option
- func WithMCP(config appmcp.Config) Option
- func WithMCPOAuth(service *oauth.Service) Option
- func WithModeration(repository moderation.Repository) Option
- func WithPersistence(ready func(context.Context) error, durable *events.Service) Option
- func WithRadar(repository radar.Repository, freshFor time.Duration) Option
- func WithReminders(repository reminders.Repository) Option
- func WithSavedEvents(repository saved.Repository) Option
- func WithUserActivity(repository useractivity.Repository) Option
Constants ¶
const DefaultLiveReplyChecks = 30
DefaultLiveReplyChecks is each account's live reply checks per minute per replica: five open conversations at the browser's ten-second pace.
Variables ¶
This section is empty.
Functions ¶
func LiveReplyChecksFromEnv ¶
LiveReplyChecksFromEnv reads DISCUSSION_LIVE_CHECKS_PER_MINUTE: each account's live reply checks per minute per replica, 0 (off) to 6000. Unset, empty or blank means DefaultLiveReplyChecks. The upper range is for benchmarks, whose simulated participants share a few accounts.
Types ¶
type Option ¶
type Option func(*api)
func WithAgentDrafts ¶
func WithAgentDrafts(repository drafts.Repository) Option
WithAgentDrafts stores agents' private drafts for the person to review and publish at /me/drafts; it needs recommendations to publish reasons, and discussions to publish questions, tips and replies.
func WithDiscovery ¶
WithDiscovery shares one provider service between HTTP and scheduled reads. Apply it before options which construct services using discovery.
func WithDiscussionFollows ¶
func WithDiscussionFollows(repository discussionfollows.Repository) Option
func WithEventActivity ¶
func WithEventActivity(repository eventactivity.Repository) Option
func WithEventDiscussions ¶
func WithEventDiscussions(repository discussions.Repository) Option
func WithEventInterests ¶
func WithEventInterests(repository interests.Repository) Option
func WithEventRecommendations ¶
func WithEventRecommendations(repository recommendations.Repository) Option
func WithFollows ¶
func WithFollows(repository follows.Repository) Option
func WithLiveReplyChecks ¶
WithLiveReplyChecks sets each account's live reply checks per minute per replica; 0 turns live replies off, so conversations update on reload only.
func WithLocation ¶
WithLocation replaces the environment-configured IP location resolver.
func WithMCP ¶
WithMCP serves the agent tools at /mcp when config.Enabled: public tools, and signed-in tools for requests with a valid API token.
func WithMCPOAuth ¶
WithMCPOAuth lets agents sign in to /mcp through OAuth when MCP and config.OAuth are enabled and accounts are on.
func WithModeration ¶
func WithModeration(repository moderation.Repository) Option
func WithPersistence ¶
WithPersistence wires database readiness and durable identity services.
func WithReminders ¶
func WithReminders(repository reminders.Repository) Option
func WithSavedEvents ¶
func WithSavedEvents(repository saved.Repository) Option
func WithUserActivity ¶
func WithUserActivity(repository useractivity.Repository) Option
Source Files
¶
- account_navigation.go
- accounts.go
- agent_publishing.go
- api.go
- assets.go
- calendar.go
- community_activity.go
- discussion_follows.go
- discussions.go
- drafts.go
- follows.go
- happening_now.go
- healthcheck.go
- interests.go
- live_activity.go
- live_filters.go
- live_picker.go
- live_preferences.go
- live_replies.go
- location.go
- mcp.go
- moderation.go
- not_found.go
- oauth.go
- offline.go
- pages.go
- public_cache.go
- radar.go
- recommendations.go
- reminders.go
- request_log.go
- saved.go
- ticketmaster.go