Initial pgterminate code
This commit is contained in:
parent
0487d635fc
commit
565c45a8fc
15 changed files with 697 additions and 0 deletions
17
base/context.go
Normal file
17
base/context.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package base
|
||||
|
||||
// Context stores dynamic values like channels and exposes configuration
|
||||
type Context struct {
|
||||
Sessions chan Session
|
||||
Done chan bool
|
||||
Config *Config
|
||||
}
|
||||
|
||||
// NewContext instanciates a Context
|
||||
func NewContext(config *Config, sessions chan Session, done chan bool) *Context {
|
||||
return &Context{
|
||||
Config: config,
|
||||
Sessions: sessions,
|
||||
Done: done,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue