regagent

package
v0.0.0-...-2bb1cf3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventStoreClient

func NewEventStoreClient(ctx context.Context) (region.Notifier, error)

NewEventStoreClient instantiates an event notifier that targets the events service returned by utils.DefaultDiscovery

Types

type AppGenerator

type AppGenerator struct{}

func (*AppGenerator) Application

Application implements the expectations of the application backend

type EventArmy

type EventArmy struct {
	SourceCityID uint64 `json:"SourceCityId"`
	SourceCity   string `json:"SourceCity"`

	ArmyID   string `json:"ArmyId"`
	ArmyName string `json:"Army"`

	ArmyCityID   uint64 `json:"ArmyCityId"`
	ArmyCityName string `json:"ArmyCity"`

	Src uint64 `json:"Src"`
	Dst uint64 `json:"Dst"`

	Action string `json:"action"`
	// contains filtered or unexported fields
}

func (*EventArmy) Item

func (evt *EventArmy) Item(a *region.Army) region.EventArmy

func (*EventArmy) Move

func (evt *EventArmy) Move(src, dst uint64) region.EventArmy

func (*EventArmy) NoRoute

func (evt *EventArmy) NoRoute(src, dst uint64) region.EventArmy

func (*EventArmy) Send

func (evt *EventArmy) Send()

type EventSkill

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

func (*EventSkill) Item

func (evt *EventSkill) Item(c *region.City, kt *region.SkillType) region.EventSkill

func (*EventSkill) Send

func (evt *EventSkill) Send()

func (*EventSkill) Step

func (evt *EventSkill) Step(current, max uint64) region.EventSkill

type EventStore

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

func (*EventStore) Army

func (es *EventStore) Army(log *region.City) region.EventArmy

func (*EventStore) Skill

func (es *EventStore) Skill(log *region.City) region.EventSkill

func (*EventStore) Units

func (es *EventStore) Units(log *region.City) region.EventUnits

type EventUnits

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

func (*EventUnits) Item

func (evt *EventUnits) Item(c *region.City, ut *region.UnitType) region.EventUnits

func (*EventUnits) Send

func (evt *EventUnits) Send()

func (*EventUnits) Step

func (evt *EventUnits) Step(current, max uint64) region.EventUnits

type GMCityController

type GMCityController interface {
	// Config applies a model City on the current City
	Config(modelID string) error

	// Assign sets the ownership on the current City
	Assign(userID string) error

	// Resume allows the user to control the City
	Resume() error

	// Dismiss removes the ownership on the current City
	Dismiss() error

	// Suspend prevents the user from controlling the City
	Suspend() error

	// Reset removes any activity footprint from the current City
	Reset() error
}

type UserCityController

type UserCityController interface {
	// Config applies to the current City a model identified by its ID
	Config(modelID string) error

	// Acquire takes the ownership on a City and assigns it to userID
	Acquire(userID string) error

	// Leave voluntarily abandon the ownership on the current City
	Leave() error

	// Auto toggles the automatic mode on the current City
	Auto() error
}

Jump to

Keyboard shortcuts

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