Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvVarBotTeam = "BOT_TEAM" EnvVarBotNumber = "BOT_NUMBER" EnvVarBotGrpcUrl = "BOT_GRPC_URL" EnvVarBotGrpcInsecure = "BOT_GRPC_INSECURE" EnvVarBotToken = "BOT_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func DefaultLogger ¶
func DefaultLogger(config Config) (*zap.SugaredLogger, error)
DefaultLogger creates a logger that is compatible with the lugo4go.Handler expected logger. The bots are NOT obligated to use this logger though. You may implement your own logger.
Types ¶
type Config ¶
type Config struct { // Full url to the gRPC server GRPCAddress string `json:"grpc_address"` Insecure bool `json:"insecure"` Token string `json:"token"` TeamSide proto.Team_Side `json:"-"` Number uint32 `json:"-"` InitialPosition *proto.Point `json:"-"` // contains filtered or unexported fields }
Config is the set of values expected as a initial configuration of the player
func DefaultInitBundle ¶
func DefaultInitBundle() (Config, *zap.SugaredLogger, error)
DefaultInitBundle created a basic configuration that may be used by the client to connect to the server. It also creates a logger that is compatible with the lugo4go.Handler.
func (*Config) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.