core

package
v0.0.0-...-e6a49c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2018 License: BSD-3-Clause, MIT Imports: 12 Imported by: 4

Documentation

Overview

PuSud's core contains all the logic on how to run PuSud. How to deal with clients, and relays, how to pass messages, etc.

The code isn't that re-usable outside of the app itself.

Index

Constants

View Source
const CLIENT_DEBUG = false
View Source
const INCOMING_BUFFER = 100

Buffer up to this many messages coming in

View Source
const OUTGOING_BUFFER = 100

Buffer up to this many messages going out

Variables

View Source
var DEBUG = false

Functions

func GetSettingsContents

func GetSettingsContents() *[]byte

func SetAuthenticator

func SetAuthenticator(a auth.Authenticator)

Set the active Authenticator, should probably only be called once, from main()

func SetupNetwork

func SetupNetwork(settings *Settings)

func StartListeners

func StartListeners(settings *Settings, authenticator auth.Authenticator)

Types

type Settings

type Settings struct {
	Authenticator   string   `yaml:"authenticator"`
	Relays          []string `yaml:"relays"`
	ClientPort      int      `yaml:"client_port"`
	NetworkPort     int      `yaml:"network_port"`
	AllowedChannels []string `yaml:"allowed_channels"`
}

func GetSettings

func GetSettings() *Settings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL