Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ConfigDir string `json:"-"` MaxBufferLines int `json:"maxBufferLines"` PublicKey ed25519.PublicKey `json:"publicKey"` PrivateKey ed25519.PrivateKey `json:"privateKey"` ServerReporting Reporting `json:"serverReporting"` }
Config is a struct for storing basic server configuration
func LoadConfig ¶
LoadConfig loads a Config from a json file specified by filename
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance encapsulates the Ricochet application.
func (*Instance) HandleFetchRequest ¶
func (si *Instance) HandleFetchRequest() []*protocol.GroupMessage
HandleFetchRequest returns a list of all messages in the servers buffer
func (*Instance) HandleGroupMessage ¶
func (si *Instance) HandleGroupMessage(gm *protocol.GroupMessage)
HandleGroupMessage takes in a group message and distributes it to all listening peers
func (*Instance) Init ¶
func (si *Instance) Init(rai *application.Instance, ra *application.RicochetApplication, msi storage.MessageStoreInterface)
Init sets up a Server Instance
type Reporting ¶
type Reporting struct { LogMetricsToFile bool `json:"logMetricsToFile"` ReportingGroupID string `json:"reportingGroupId"` ReportingServerAddr string `json:"reportingServerAddr"` }
Reporting is a struct for storing a the config a server needs to be a peer, and connect to a group to report
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server encapsulates a complete, compliant Cwtch server.
Click to show internal directories.
Click to hide internal directories.