monitor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableDebugLogging

func EnableDebugLogging(l *zap.Logger)

func Init

func Init(configFile *string, parentContext context.Context) (*http.Server, func(), error)

Types

type AbiConfig

type AbiConfig struct {
	// contains filtered or unexported fields
}

type AbiDecoder

type AbiDecoder struct {
	// contains filtered or unexported fields
}

func (*AbiDecoder) Decode

func (a *AbiDecoder) Decode(data []byte) (*Event, error)

type ActionTraceRows

type ActionTraceRows struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

type ConfigFile

type ConfigFile struct {
	Database struct {
		Url    string `yaml:"url"`
		Filter struct {
			Name    string `yaml:"name"`
			Account string `yaml:"account"`
		} `yaml:"filter"`
	} `yaml:"database"`

	Server struct {
		Addr string `yaml:"addr"`
	} `yaml:"server"`

	Session struct {
		WriteWait          string `yaml:"writeWait"`
		PongWait           string `yaml:"pongWait"`
		MaxEventsInMessage int    `yaml:"maxEventsInMessage"`
	} `yaml:"session"`

	Upgrader struct {
		ReadBufferSize  int `yaml:"readBufferSize"`
		WriteBufferSize int `yaml:"writeBufferSize"`
	} `yaml:"upgrader"`

	Abi struct {
		Main   string         `yaml:"main"`
		Events map[int]string `yaml:"events"`
	} `yaml:"abi"`

	EventExpires   string `yaml:"eventExpires"`
	SharedDatabase struct {
		Url string `yaml:"url"`
	} `yaml:"sharedDatabase"`
}

type DatabaseConfig

type DatabaseConfig struct {
	// contains filtered or unexported fields
}

type DatabaseConnect

type DatabaseConnect interface {
	QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
	Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error)
}

type DatabaseFilters

type DatabaseFilters struct {
	// contains filtered or unexported fields
}

type DatabaseMock

type DatabaseMock struct{}

func (*DatabaseMock) Query

func (m *DatabaseMock) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error)

func (*DatabaseMock) QueryRow

func (m *DatabaseMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row

type DatabaseMockRow

type DatabaseMockRow struct{}

func (*DatabaseMockRow) Scan

func (r *DatabaseMockRow) Scan(dest ...interface{}) error

type DatabaseMockRows

type DatabaseMockRows struct{}

func (*DatabaseMockRows) Close

func (r *DatabaseMockRows) Close()

func (*DatabaseMockRows) CommandTag

func (r *DatabaseMockRows) CommandTag() pgconn.CommandTag

func (*DatabaseMockRows) Err

func (r *DatabaseMockRows) Err() error

func (*DatabaseMockRows) FieldDescriptions

func (r *DatabaseMockRows) FieldDescriptions() []pgproto3.FieldDescription

func (*DatabaseMockRows) Next

func (r *DatabaseMockRows) Next() bool

func (*DatabaseMockRows) RawValues

func (r *DatabaseMockRows) RawValues() [][]byte

func (*DatabaseMockRows) Scan

func (r *DatabaseMockRows) Scan(dest ...interface{}) error

func (*DatabaseMockRows) Values

func (r *DatabaseMockRows) Values() ([]interface{}, error)

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

type Event

type Event struct {
	Offset    uint64          `json:"offset"`
	Sender    string          `json:"sender"`
	CasinoID  uint64          `json:"casino_id"`
	GameID    uint64          `json:"game_id"`
	RequestID uint64          `json:"req_id"`
	EventType int             `json:"event_type"`
	Data      json.RawMessage `json:"data"`
}

type EventDataSlice

type EventDataSlice []byte

func (*EventDataSlice) MarshalJSON

func (m *EventDataSlice) MarshalJSON() ([]byte, error)

func (*EventDataSlice) UnmarshalJSON

func (m *EventDataSlice) UnmarshalJSON(data []byte) error

type EventMessage

type EventMessage struct {
	Offset uint64   `json:"offset"` // last event.offset
	Events []*Event `json:"events"`
}

type Queue

type Queue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type RawEvent

type RawEvent struct {
	Offset    uint64         `json:"offset"`
	Sender    string         `json:"sender"`
	CasinoID  interface{}    `json:"casino_id"`
	GameID    interface{}    `json:"game_id"`
	RequestID interface{}    `json:"req_id"`
	EventType int            `json:"event_type"`
	Data      EventDataSlice `json:"data"`
}

func (*RawEvent) ToEvent

func (src *RawEvent) ToEvent(data json.RawMessage) (*Event, error)

type RequestMessage

type RequestMessage struct {
	ID     *string         `json:"id"`
	Method *string         `json:"method"`
	Params json.RawMessage `json:"params"`
}

type ResponseErrorMessage

type ResponseErrorMessage struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ResponseMessage

type ResponseMessage struct {
	ID     *string               `json:"id"`
	Result json.RawMessage       `json:"result"`
	Error  *ResponseErrorMessage `json:"error"`
}

type Scraper

type Scraper struct {
	// contains filtered or unexported fields
}

type ScraperBroadcastMessage

type ScraperBroadcastMessage struct {
	// contains filtered or unexported fields
}

type ScraperResponseMessage

type ScraperResponseMessage struct {
	// contains filtered or unexported fields
}

type ScraperSubscribeMessage

type ScraperSubscribeMessage struct {
	// contains filtered or unexported fields
}

type ScraperUnsubscribeMessage

type ScraperUnsubscribeMessage struct {
	// contains filtered or unexported fields
}

type Session

type Session struct {
	ID string

	sync.Mutex
	// contains filtered or unexported fields
}

func (*Session) Offset

func (s *Session) Offset() uint64

type SessionConfig

type SessionConfig struct {
	// contains filtered or unexported fields
}

type SessionManager

type SessionManager struct {
	// contains filtered or unexported fields
}

type SharedDatabaseConfig

type SharedDatabaseConfig struct {
	// contains filtered or unexported fields
}

type SqlQuery

type SqlQuery struct {
	// contains filtered or unexported fields
}

type UpgraderConfig

type UpgraderConfig struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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