groupthink

package module
v0.0.0-...-878be4e Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 13 Imported by: 0

README

Go Go Report Card

groupthink

groupthink is a Go package implementing a brainstorming server.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerClosed = errors.New("groupthink: Server closed")

Functions

func RunAIClient

func RunAIClient()

RunAIClient creates a new GroupThink client with ChatGPT support.

func RunClient

func RunClient(addr string)

func Start

func Start()

Start creates and starts a groupthink server.

Types

type Client

type Client struct {
	Conn  net.Conn
	Items []string
}

func NewClient

func NewClient(addr string) (*Client, error)

func (*Client) AddItem

func (c *Client) AddItem(item string) error

type Server

type Server struct {
	Address   string
	Listener  net.Listener
	ErrLogger log.Logger
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) AddItem

func (srv *Server) AddItem(i string)

AddItem takes a string representing the item name and stores it in the store.

func (*Server) Close

func (srv *Server) Close() error

func (*Server) Items

func (srv *Server) Items() []string

Items returns all stored items.

func (*Server) Listen

func (srv *Server) Listen(addr string) error

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe() error

func (*Server) Serve

func (srv *Server) Serve()

type Store

type Store struct {
	Ideas map[string]bool
	// contains filtered or unexported fields
}

func (*Store) Add

func (s *Store) Add(idea string)

func (*Store) List

func (s *Store) List() []string

type Storer

type Storer interface {
	Add(string)
	List() []string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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