grpcplugin

package
v0.13.426 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	sgc7plugin.BasicPlugin

	Rngs      []uint32
	RngClient *RngClient
}

Plugin - plugin for BGG

func NewPlugin

func NewPlugin(rngServAddr string, gameCode string, useOpenTelemetry bool) *Plugin

NewPlugin - new Plugin (IPlugin)

func (*Plugin) ClearCache

func (plugin *Plugin) ClearCache()

ClearCache - clear cached rngs

func (*Plugin) Init

func (plugin *Plugin) Init()

Init - initial

func (*Plugin) Random

func (plugin *Plugin) Random(ctx context.Context, r int) (int, error)

Random - return [0, r)

func (*Plugin) SetCache

func (plugin *Plugin) SetCache(arr []int)

SetCache - set cache

type RngClient

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

RngClient - DTRngClient

func NewRngClient

func NewRngClient(servAddr string, gameCode string, useOpenTelemetry bool) *RngClient

NewRngClient - new RngClient

func (*RngClient) GetRngs

func (client *RngClient) GetRngs(ctx context.Context, nums int) ([]uint32, error)

GetRngs - get rngs

Jump to

Keyboard shortcuts

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