Documentation ¶
Index ¶
- func GetEnv() (requested bool)
- func HelpRequested() (help bool)
- func MonitorResources(c context.T)
- func NewConfig() (cfg *Config, err E)
- func PrintEnv(cfg *Config, printer io.Writer)
- func PrintHelp(cfg *Config, printer io.Writer)
- type B
- type Config
- type Ctx
- type E
- type N
- type Relay
- func (r *Relay) AcceptEvent(c context.T, evt *event.T, hr *http.Request, origin S, authedPubkey B) bool
- func (r *Relay) AcceptReq(c Ctx, hr *http.Request, id B, ff *filters.T, authedPubkey B) bool
- func (r *Relay) AuthEnabled() bool
- func (r *Relay) CheckOwnerLists(c context.T)
- func (r *Relay) Init() (err E)
- func (r *Relay) Name() S
- func (r *Relay) ServiceUrl(req *http.Request) (s S)
- func (r *Relay) Storage(c context.T) store.I
- type S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelpRequested ¶
func HelpRequested() (help bool)
HelpRequested returns true if any of the common types of help invocation are found as the first command line parameter/flag.
func MonitorResources ¶ added in v1.0.14
Types ¶
type Config ¶
type Config struct { AppName S `env:"APP_NAME" default:"realy"` Root S `env:"ROOT_DIR" usage:"root path for all other path configurations (defaults OS user home if empty)"` Profile S `env:"PROFILE" default:".realy" usage:"name of directory in root path to store relay state data and database"` Listen S `env:"LISTEN" default:"0.0.0.0" usage:"network listen address"` Port N `env:"PORT" default:"3334" usage:"port to listen on"` AdminListen S `env:"ADMIN_LISTEN" default:"127.0.0.1" usage:"admin listen address"` AdminPort N `env:"ADMIN_PORT" default:"3337" usage:"admin listen port"` LogLevel S `env:"LOG_LEVEL" default:"info" usage:"debug level: fatal error warn info debug trace"` DbLogLevel S `env:"DB_LOG_LEVEL" default:"info" usage:"debug level: fatal error warn info debug trace"` AuthRequired bool `env:"AUTH_REQUIRED" default:"false" usage:"requires auth for all access"` Owners []S `` /* 202-byte string literal not displayed */ DBSizeLimit int `env:"DB_SIZE_LIMIT" usage:"the number of gigabytes (1,000,000,000 bytes) we want to keep the data store from exceeding"` DBLowWater int `env:"DB_LOW_WATER" default:"80" usage:"the percentage of DBSizeLimit a GC run will reduce the used storage down to"` DBHighWater int `env:"DB_HIGH_WATER" default:"90" usage:"the trigger point at which a GC run should start if exceeded"` GCFrequency time.Duration `env:"GC_FREQUENCY" default:"1h" usage:"the frequency of checks of the current utilisation"` Pprof bool `env:"PPROF" default:"false" usage:"enable pprof on 127.0.0.1:6060"` }
type Relay ¶
func (*Relay) AcceptEvent ¶
func (*Relay) AuthEnabled ¶ added in v1.0.7
func (*Relay) CheckOwnerLists ¶ added in v1.0.10
CheckOwnerLists regenerates the owner follow and mute lists if they are empty
func (*Relay) ServiceUrl ¶
ServiceUrl returns the address of the relay to send back in auth responses. If auth is disabled this returns an empty string.
Click to show internal directories.
Click to hide internal directories.