Documentation ¶
Index ¶
- Constants
- func CalcLimit(mortgaged string) (int64, error)
- func CalcLimitByLevel(level int64) (int64, error)
- func CloseAndLogIfError(ctx context.Context, closer io.Closer, message string)
- func DecryptInfo(guid string, keyStr string) (res []byte, err error)
- func SetupHookLogging(hooks []config.LogrusHook, componentName string)
- func SetupPprof()
- func SetupStdLogging()
- func VersionString() string
- type JwtParam
- type MutexByRoom
Constants ¶
View Source
const ( VersionMajor = 0 VersionMinor = 9 VersionPatch = 1 VersionTag = "" // example: "rc1" )
Variables ¶
This section is empty.
Functions ¶
func CalcLimitByLevel ¶
func CloseAndLogIfError ¶
CloseAndLogIfError Closes io.Closer and logs the error if any
func SetupHookLogging ¶
func SetupHookLogging(hooks []config.LogrusHook, componentName string)
SetupHookLogging configures the logging hooks defined in the configuration. If something fails here it means that the logging was improperly configured, so we just exit with the error
func SetupPprof ¶
func SetupPprof()
SetupPprof starts a pprof listener. We use the DefaultServeMux here because it is simplest, and it gives us the freedom to run pprof on a separate port.
func SetupStdLogging ¶
func SetupStdLogging()
SetupStdLogging configures the logging format to standard output. Typically, it is called when the config is not yet loaded.
func VersionString ¶
func VersionString() string
Types ¶
type MutexByRoom ¶
type MutexByRoom struct {
// contains filtered or unexported fields
}
func NewMutexByRoom ¶
func NewMutexByRoom() *MutexByRoom
func (*MutexByRoom) Lock ¶
func (m *MutexByRoom) Lock(roomID string)
func (*MutexByRoom) Unlock ¶
func (m *MutexByRoom) Unlock(roomID string)
Directories ¶
Path | Synopsis |
---|---|
Package hooks exposes places in Dendrite where custom code can be executed, useful for MSCs.
|
Package hooks exposes places in Dendrite where custom code can be executed, useful for MSCs. |
Click to show internal directories.
Click to hide internal directories.