lang: funcs: Rename things for consistency
Also fix a few copy-pasta issues in the documentation.
This commit is contained in:
@@ -165,7 +165,7 @@ func (obj *ContainsPolyFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *ContainsPolyFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -216,7 +216,7 @@ func (obj *ContainsPolyFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *ContainsPolyFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -65,7 +65,7 @@ func (obj *ExchangeFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *ExchangeFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.watchChan = make(chan error) // XXX: sender should close this, but did I implement that part yet???
|
||||
@@ -171,7 +171,7 @@ func (obj *ExchangeFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *ExchangeFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -63,7 +63,7 @@ func (obj *KVLookupFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *KVLookupFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.watchChan = make(chan error) // XXX: sender should close this, but did I implement that part yet???
|
||||
@@ -160,7 +160,7 @@ func (obj *KVLookupFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *KVLookupFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
@@ -171,7 +171,7 @@ func (obj *PrintfFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *PrintfFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -230,7 +230,7 @@ func (obj *PrintfFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *PrintfFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -248,7 +248,7 @@ func (obj *SchedulePolyFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *SchedulePolyFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.watchChan = make(chan *schedulerResult)
|
||||
@@ -435,7 +435,7 @@ func (obj *SchedulePolyFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *SchedulePolyFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -150,7 +150,7 @@ func (obj *TemplateFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *TemplateFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -283,7 +283,7 @@ func (obj *TemplateFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *TemplateFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -66,7 +66,7 @@ func (obj *VUMeterFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *VUMeterFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -164,7 +164,7 @@ func (obj *VUMeterFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *VUMeterFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
@@ -66,12 +66,12 @@ func (obj *FactFunc) Init(init *interfaces.Init) error {
|
||||
)
|
||||
}
|
||||
|
||||
// Stream returns the changing values that this fact has over time.
|
||||
// Stream returns the changing values that this function has over time.
|
||||
func (obj *FactFunc) Stream() error {
|
||||
return obj.Fact.Stream()
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *FactFunc) Close() error {
|
||||
return obj.Fact.Close()
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ func (obj *HistoryFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *HistoryFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -227,7 +227,7 @@ func (obj *HistoryFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *HistoryFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -221,7 +221,7 @@ func (obj *MapLookupPolyFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *MapLookupPolyFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -278,7 +278,7 @@ func (obj *MapLookupPolyFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *MapLookupPolyFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -550,7 +550,7 @@ func (obj *OperatorPolyFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *OperatorPolyFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -630,7 +630,7 @@ func (obj *OperatorPolyFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *OperatorPolyFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
@@ -210,7 +210,7 @@ func (obj *StructLookupPolyFunc) Info() *interfaces.Info {
|
||||
}
|
||||
}
|
||||
|
||||
// Init runs some startup code for this fact.
|
||||
// Init runs some startup code for this function.
|
||||
func (obj *StructLookupPolyFunc) Init(init *interfaces.Init) error {
|
||||
obj.init = init
|
||||
obj.closeChan = make(chan struct{})
|
||||
@@ -275,7 +275,7 @@ func (obj *StructLookupPolyFunc) Stream() error {
|
||||
}
|
||||
}
|
||||
|
||||
// Close runs some shutdown code for this fact and turns off the stream.
|
||||
// Close runs some shutdown code for this function and turns off the stream.
|
||||
func (obj *StructLookupPolyFunc) Close() error {
|
||||
close(obj.closeChan)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user