Documentation ¶
Index ¶
- Constants
- Variables
- func GetFunctionName(f interface{}) string
- func HashValue(value interface{}) uint64
- type ReceiverType
- type Sima
- func (s *Sima) Connect(receiver ReceiverType, senderName string) ReceiverType
- func (s *Sima) Disconnect(receiver ReceiverType, senderName string) bool
- func (s *Sima) Dispatch(context context.Context, senderName string) []interface{}
- func (s *Sima) GetReceiversFor(senderName string) []ReceiverType
- func (s *Sima) HasReceiversFor(senderName string) bool
- type Topic
- type TopicFactory
Constants ¶
const ANY = "ANY"
This initial signal name is imported by default
const ANY_ID = iota
const NONE = "NONE"
const Version = "0.1.0"
The main version number that is being run at the moment.
Variables ¶
var GitCommit string
The git commit that was compiled. This will be filled in by the compiler.
var VersionPrerelease = ""
A pre-release marker for the version. If this is "" (empty string) then it means that it is a final release. Otherwise, this is a pre-release such as "dev" (in development)
Functions ¶
func GetFunctionName ¶
func GetFunctionName(f interface{}) string
Types ¶
type ReceiverType ¶
type Sima ¶
type Sima struct {
// contains filtered or unexported fields
}
func NewSima ¶
func NewSima(topicFactory *TopicFactory) *Sima
func (*Sima) Connect ¶
func (s *Sima) Connect(receiver ReceiverType, senderName string) ReceiverType
Connects *receiver* of signal events sent by *sender*
func (*Sima) Disconnect ¶
func (s *Sima) Disconnect(receiver ReceiverType, senderName string) bool
Disconnect *receiver* from this signal's events. Returns true if successful or false otherwise
func (*Sima) Dispatch ¶
Emit this signal on behalf of *sender*, passing on Context. Returns a list of results from the receivers
func (*Sima) GetReceiversFor ¶
func (s *Sima) GetReceiversFor(senderName string) []ReceiverType
Emit this signal on behalf of *sender*, passing on Context. Returns a list of senders that accepted the signal
func (*Sima) HasReceiversFor ¶
True if there is a receiver for *sender* at the time of the call
type Topic ¶
type Topic struct {
// contains filtered or unexported fields
}
A constant topic symbol
type TopicFactory ¶
type TopicFactory struct {
// contains filtered or unexported fields
}
func NewTopicFactory ¶
func NewTopicFactory() *TopicFactory
Repeated calls of TopicFactory('name') will all return the same instance.
func (*TopicFactory) GetByName ¶
func (f *TopicFactory) GetByName(name string) *Topic
func (*TopicFactory) Names ¶
func (f *TopicFactory) Names() []interface{}