services

package
v0.0.0-...-3b1d31a Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func NewAPICaller

func NewAPICaller(ctx context.Context, cfg *config.Config, client *resty.Client) (*APIClient, error)

func (*APIClient) Request

func (c *APIClient) Request(ctx context.Context, request domain.APIRequest) (contracts.APIResponse, error)

type LocalCache

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

func NewLocalCache

func NewLocalCache(_ *config.Config) (*LocalCache, error)

func (*LocalCache) Delete

func (cache *LocalCache) Delete(_ context.Context, key string)

func (*LocalCache) Get

func (cache *LocalCache) Get(_ context.Context, key string)

func (*LocalCache) Set

func (cache *LocalCache) Set(_ context.Context, key string, val interface{}, ttl time.Duration)

type LocalStore

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

func NewLocalStore

func NewLocalStore(_ *config.Config) (*LocalStore, error)

func (*LocalStore) Delete

func (store *LocalStore) Delete(_ context.Context, key string)

func (*LocalStore) Get

func (store *LocalStore) Get(_ context.Context, key string)

func (*LocalStore) Set

func (store *LocalStore) Set(_ context.Context, key string, val interface{})

type Runner

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

func NewProcessRunner

func NewProcessRunner(
	cfg *config.Config,
	executor contracts.Executor,
	commandFactory *gameservercommands.ServerCommandFactory,
	apiClient contracts.APIRequestMaker,
	gdTaskManager *gdaemonscheduler.TaskManager,
	serverRepository domain.ServerRepository,
	serverTaskRepository domain.ServerTaskRepository,
) (*Runner, error)

func (*Runner) Init

func (r *Runner) Init(ctx context.Context, cfg *config.Config) error

func (*Runner) RunGDaemonServer

func (r *Runner) RunGDaemonServer(ctx context.Context, cfg *config.Config) func() error

func (*Runner) RunGDaemonTaskScheduler

func (r *Runner) RunGDaemonTaskScheduler(ctx context.Context, _ *config.Config) func() error

func (*Runner) RunServerScheduler

func (r *Runner) RunServerScheduler(ctx context.Context, cfg *config.Config) func() error

func (*Runner) RunServersLoop

func (r *Runner) RunServersLoop(ctx context.Context, cfg *config.Config) func() error

Jump to

Keyboard shortcuts

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