Documentation
¶
Overview ¶
A simple agent that notices blackboard changing
Concludes by putting a future call to itself back into the slipnet controller A more general, non slipnet specific version may be better in the future. for now we stay narrow. Cognitive clock?
Index ¶
- func BenchA2ALatency100MiB(b *B)
- func BenchA2ALatency10MiB(b *B)
- func BenchA2ALatency1GiB(b *B)
- func BenchA2ALatency1KiB(b *B)
- func BenchA2ALatency1MiB(b *B)
- func BenchA2ALatency32B(b *B)
- func BenchA2ALatency4KiB(b *B)
- func BenchAgentBBLatency(b *B)
- func BenchAgentOverhead(b *B)
- func GetAgentPipe(bb_addr string, tags ...string) (snd *PipeSender, rcv *PipeReceiver)
- func RandStringRunes(n int) string
- type B
- type BFunc
- type BufferedMessage
- type ChangeAgent
- type ChatAgent
- type NetworkBenchmarkAgent
- type PingAgent
- type PingAgent2
- type PipeReceiver
- type PipeSender
- type PongAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchA2ALatency100MiB ¶
func BenchA2ALatency100MiB(b *B)
func BenchA2ALatency10MiB ¶
func BenchA2ALatency10MiB(b *B)
func BenchA2ALatency1GiB ¶
func BenchA2ALatency1GiB(b *B)
func BenchA2ALatency1KiB ¶
func BenchA2ALatency1KiB(b *B)
func BenchA2ALatency1MiB ¶
func BenchA2ALatency1MiB(b *B)
func BenchA2ALatency32B ¶
func BenchA2ALatency32B(b *B)
func BenchA2ALatency4KiB ¶
func BenchA2ALatency4KiB(b *B)
func BenchAgentOverhead ¶
func BenchAgentOverhead(b *B)
func GetAgentPipe ¶
func GetAgentPipe(bb_addr string, tags ...string) (snd *PipeSender, rcv *PipeReceiver)
Get sender and receiver connected by the provided tags
func RandStringRunes ¶
Types ¶
type BufferedMessage ¶
type ChangeAgent ¶
type ChangeAgent struct { LastHash string *client.BasicAgent // contains filtered or unexported fields }
func NewChangeAgent ¶
func NewChangeAgent(addr string, n_msg int) *ChangeAgent
Change agent is a "meta" agent monitoring blackboard state
func (*ChangeAgent) Loop ¶
func (agt *ChangeAgent) Loop() (cont bool, err error)
This agent starts, does it job, then dies
func (*ChangeAgent) Setup ¶
func (agt *ChangeAgent) Setup() error
type ChatAgent ¶
type ChatAgent struct { *client.BasicAgent // contains filtered or unexported fields }
func (*ChatAgent) GUICompleted ¶
func (c *ChatAgent) GUICompleted() chan struct{}
func (*ChatAgent) SetModeLine ¶
func (*ChatAgent) TriggerRedraw ¶
func (c *ChatAgent) TriggerRedraw()
type NetworkBenchmarkAgent ¶
type NetworkBenchmarkAgent struct { *client.BasicAgent // contains filtered or unexported fields }
func (*NetworkBenchmarkAgent) Loop ¶
func (a *NetworkBenchmarkAgent) Loop() (cont bool, err error)
NetworkBenchmarkAgent runs all of our network benchmarks and reports results to the blackboard No statistics possible with this approach though (just tracking total time)
func (*NetworkBenchmarkAgent) Setup ¶
func (a *NetworkBenchmarkAgent) Setup() error
type PingAgent ¶
type PingAgent struct { *client.BasicAgent // contains filtered or unexported fields }
func (*PingAgent) Loop ¶
In this low-level implementation, we don't **need** to use the ManagedAgent loop to handle anything, other than to keep the program running. However, if you'd like a more "well-behaved" Agent that shuts down nicely, you have to include a select statement for the done channel as is done below.
func (*PingAgent) OnNewMessage ¶
Downside: exposes users to the proto interface (was trying to keep more high level, restrict to just the Post type)
Downside: Loop and Setup don't really do anything since OnNewMessage is just invoked whenever a message arrives. Kind of obviates the need for a "ManagedAgent" style interface in the Go API. Definitely feels "lower level" than the ListenFor approach.
type PingAgent2 ¶
type PingAgent2 struct { *client.BasicAgent // contains filtered or unexported fields }
func (*PingAgent2) Loop ¶
func (a *PingAgent2) Loop() (cont bool, err error)
In this low-level implementation, we don't need to use the ManagedAgent loop to handle anything, other than to keep the program running.
func (*PingAgent2) Setup ¶
func (a *PingAgent2) Setup() error
type PipeReceiver ¶
type PipeReceiver struct { *client.BasicAgent // contains filtered or unexported fields }
type PipeSender ¶
type PipeSender struct { *client.BasicAgent // contains filtered or unexported fields }
This agent pipe structure is supposed to be a super lightweight set of connected agents with send and receive tags already set up. It's more "udp" in nature in that we eschew error handling and let it fly
I think these agents will leak goroutines TODO: we need a way pass anything that inherits from a BasicAgent and kill any running goroutines
func (*PipeSender) Send ¶
func (a *PipeSender) Send(data []byte)