Documentation ¶
Overview ¶
Copyright 2017 Mailgun Technologies Inc
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Mailgun Technologies Inc ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Mailgun Technologies Inc ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
func NewBroadcaster ¶
func NewBroadcaster() Broadcaster
type FanOut ¶
type FanOut struct {
// contains filtered or unexported fields
}
FanOut spawns a new go-routine each time `Run()` is called until `size` is reached, subsequent calls to `Run()` will block until previously `Run()` routines have completed. Allowing the user to control how many routines will run simultaneously. `Wait()` then collects any errors from the routines once they have all completed.
type WaitGroup ¶
type WaitGroup struct {
// contains filtered or unexported fields
}
func (*WaitGroup) Loop ¶
Run a goroutine in a loop continuously, if the callBack returns false the loop is broken
func (*WaitGroup) Stop ¶
func (wg *WaitGroup) Stop()
Stop closes the done channel passed into `Until()` calls and waits for the `Until()` callBack to return false.
func (*WaitGroup) Until ¶
Run a goroutine in a loop continuously, if the callBack returns false the loop is broken. `Until()` differs from `Loop()` in that if the `Stop()` is called on the WaitGroup the `done` channel is closed. Implementations of the callBack function can listen for the close to indicate a stop was requested.