server

package
v0.0.0-...-05593c5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port          string
	Hostname      string
	ServerKeyPath string
	ServerCrtPath string
	AutoTLS       bool
	CacheDir      string
}

Config is the configuration of the bot's main cycle.

type Dependencies

type Dependencies struct {
	Bot    bot.Bot
	Logger zerolog.Logger
}

Dependencies defines needed dependencies for this bot.

type GaiaBot

type GaiaBot struct {
	Config
	Dependencies
}

GaiaBot is a server.

func NewServer

func NewServer(cfg Config, deps Dependencies) *GaiaBot

NewServer creates a new gaia bot server.

func (*GaiaBot) Run

func (s *GaiaBot) Run(ctx context.Context) error

Run starts up the listening for PR actions.

type Server

type Server interface {
	Run(context.Context) error
}

Server defines a server which runs and accepts requests and monitors Gaia PRs.

Jump to

Keyboard shortcuts

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