Documentation ¶
Index ¶
- Constants
- Variables
- func CompressFile(path string) (*os.File, error)
- func ExtractChannelFromPath(p string) (string, error)
- func ReadCompressedFile(path string) ([]byte, error)
- func ReadNickList(n NickStore, path string) error
- func UncompressFile(path string) (*os.File, error)
- func WriteCompressedFile(path string, data []byte) (*os.File, error)
- type AvroBuffer
- type BigQueryWriter
- type BigQueryWriterConfig
- type Config
- type Destiny
- type Message
- type NickCaseMap
- type NickList
- type NickListLower
- type NickSearch
- type NickSearchResult
- type NickStore
- type Twitch
- type WriterConstructor
Constants ¶
const ( HandshakeTimeout = 10 * time.Second MaxChannelsPerChat = 50 MessageBufferSize = 1000 SocketReadTimeout = 6 * time.Minute SocketReconnectDelay = 20 * time.Second SocketWriteDebounce = 500 * time.Millisecond SocketWriteTimeout = 5 * time.Second )
const ...
Variables ¶
var ( MessageTimeLayout = "[2006-01-02 15:04:05 MST] " MessageTimeLayoutLength = len(MessageTimeLayout) MessageDateLayout = "2006-01-02" )
Log timestamp format
Functions ¶
func CompressFile ¶
CompressFile compress an existing file
func ExtractChannelFromPath ¶
ExtractChannelFromPath ...
func ReadCompressedFile ¶
ReadCompressedFile read compressed file
func ReadNickList ¶
ReadNickList adds nicks from the disk
func UncompressFile ¶
UncompressFile uncompress an existing file
Types ¶
type AvroBuffer ¶
type AvroBuffer struct { WriterConstructor WriterConstructor Codec container.Codec RecordsPerBlock int64 BytesPerFile int Writer io.Writer // contains filtered or unexported fields }
AvroBuffer ...
func NewAvroBuffer ¶
func NewAvroBuffer(writerConstructor WriterConstructor, writer io.Writer, codec container.Codec, recordsPerBlock int64, bytesPerFile int) (*AvroBuffer, error)
NewAvroBuffer ...
func (*AvroBuffer) WriteRecord ¶
func (a *AvroBuffer) WriteRecord(record container.AvroRecord) error
WriteRecord ...
type BigQueryWriter ¶
type BigQueryWriter struct {
// contains filtered or unexported fields
}
BigQueryWriter ...
func NewBigQueryWriter ¶
func NewBigQueryWriter(config BigQueryWriterConfig) (*BigQueryWriter, error)
NewBigQueryWriter ...
type BigQueryWriterConfig ¶
type BigQueryWriterConfig struct { ProjectID string `json:"projectID"` DatasetID string `json:"datasetID"` TableID string `json:"tableID"` ServiceAccountJSON string `json:"serviceAccountJSON"` }
BigQueryWriterConfig ...
type Config ¶
type Config struct { DestinyGG struct { LogHost string `toml:"logHost"` SocketURL string `toml:"socketURL"` OriginURL string `toml:"originURL"` Cookie string `toml:"cookie"` } `toml:"destinyGG"` Twitch struct { LogHost string `toml:"logHost"` SocketURL string `toml:"socketURL"` OriginURL string `toml:"originURL"` ClientID string `toml:"clientID"` OAuth string `toml:"oAuth"` Nick string `toml:"nick"` Admins []string `toml:"admins"` CommandChannel string `toml:"commandChannel"` } `toml:"twitch"` Bot struct { Admins []string `toml:"admins"` } `toml:"bot"` LogHost string `toml:"logHost"` MaxOpenLogs int `toml:"maxOpenLogs"` }
Config settings
type Destiny ¶
type Destiny struct {
// contains filtered or unexported fields
}
Destiny destiny.gg chat client
type Message ¶
Message data
func ParseMessageLine ¶
ParseMessageLine parse log line into message struct
type NickCaseMap ¶
NickCaseMap map from lower case nicks
func (NickCaseMap) Remove ¶
func (n NickCaseMap) Remove(nick string)
Remove deletes a nick from the list
type NickListLower ¶
type NickListLower map[string]struct{}
NickListLower lower case nick list for case insensitive search
func (NickListLower) Remove ¶
func (n NickListLower) Remove(nick string)
Remove deletes a nick from the list
type NickSearch ¶
type NickSearch struct {
// contains filtered or unexported fields
}
NickSearch scans nick indexes in reverse chronological order
func NewNickSearch ¶
func NewNickSearch(path string, nick string) (*NickSearch, error)
NewNickSearch create scanner
func (*NickSearch) Month ¶
func (n *NickSearch) Month(m string) (string, error)
Month searches for a nick in m
func (*NickSearch) Next ¶
func (n *NickSearch) Next() (*NickSearchResult, error)
Next find next occurrence
type NickSearchResult ¶
type NickSearchResult struct {
// contains filtered or unexported fields
}
NickSearchResult nick/path data