MCPcopy Create free account

hub / github.com/crazybber/awesome-patterns / functions

Functions583 in github.com/crazybber/awesome-patterns

↓ 37 callersMethodAdd
Add attaches tasks to the Runner. A task is a function that takes an int ID.
concurrency/runner/main.go:51
↓ 21 callersMethodClose
()
concurrency/feedreader/main.go:35
↓ 17 callersMethodAfter
()
messaging/fanout.go:70
↓ 15 callersMethodRun
()
structural/bridge/main.go:9
↓ 10 callersMethodError
()
behavioral/registry/registry.go:14
↓ 9 callersMethodGet
Get retreives an item identified by the passed id from the registry
behavioral/registry/registry.go:36
↓ 7 callersFunctionwriteStdout
writeStdout is used to write a system message directly to stdout.
workerpool/ardan_labs_worker_pool/worker_pool.go:222
↓ 6 callersMethodFetch
()
concurrency/feedreader/main.go:24
↓ 6 callersMethodNewCake
(flavour string)
structural/flyweight/main.go:16
↓ 6 callersFunctionParseDuration
(str string)
playground/cron/iso8601parser.go:9
↓ 6 callersFunctionParseInt64
(value string)
playground/cron/iso8601parser.go:26
↓ 5 callersMethodError
()
synchronization/waitgroup/error_handling.go:11
↓ 5 callersMethodString
()
idiom/iota_const/main.go:17
↓ 5 callersMethodUpdates
()
concurrency/feedreader/main.go:34
↓ 4 callersMethodAddChild
(file ...*File)
structural/composite/main.go:11
↓ 4 callersMethodFail
(f FailFunc)
messaging/future/future/main.go:21
↓ 4 callersFunctionNewTask
NewTask initializes a new task based on a given work function.
workerpool/main.go:24
↓ 4 callersMethodOpen
(string)
creational/factory_method.go:6
↓ 4 callersMethodStart
(player string)
behavioral/chain_of_responsibility/main.go:12
↓ 4 callersFunctionf
()
shadow/main.go:5
↓ 4 callersMethodinterpret
(input string)
behavioral/interpreter/Interpreter.go:26
↓ 4 callersFunctionwriteToFile
(fileName string, b []byte)
playground/cbor/cbor_test.go:97
↓ 3 callersFunctionFetch
Fetch returns a Fetcher for Items from domain.
concurrency/feedreader/main.go:494
↓ 3 callersMethodLog
(s string)
playground/zero_initialization/main.go:12
↓ 3 callersMethodPush
(v interface{})
playground/generic_data_structure/main.go:14
↓ 3 callersMethodSell
()
structural/facade/main.go:14
↓ 3 callersFunctionSubscribe
STOPSUBSCRIPTION OMIT STARTSUBSCRIBE OMIT Subscribe returns a new Subscription that uses fetcher to fetch Items.
concurrency/feedreader/main.go:42
↓ 3 callersMethodSubscribeTopic
添加一个新的订阅者,订阅过滤器筛选后的主题
messaging/pubsub/main.go:69
↓ 3 callersFunctioncatchPanic
CatchPanic is used to catch any Panic and log exceptions to Stdout. It will also write the stack trace.
workerpool/ardan_labs_worker_pool/worker_pool.go:207
↓ 3 callersFunctioncreateTask
createTask returns an example task that sleeps for the specified number of seconds based on the id.
concurrency/runner/main.go:126
↓ 3 callersFunctiongetImageBytes
(imgFile string, buf *bytes.Buffer)
playground/cbor/cbor_test.go:65
↓ 3 callersFunctionsq
The second stage, sq, receives integers from a channel and returns a channel that emits the square of each received integer. After the inbound channel
concurrency/pipeline/main.go:44
↓ 3 callersMethodupdateFav
(fav string)
behavioral/observerpattern/main.go:53
↓ 2 callersMethodAccept
(Visitor)
behavioral/visitor/main.go:11
↓ 2 callersMethodAddMemento
(memento PlayerMemento)
behavioral/memento/main.go:48
↓ 2 callersMethodBid
(price int)
behavioral/mediator/main.go:21
↓ 2 callersMethodConstruct
()
creational/builder/builder/main.go:32
↓ 2 callersMethodDrive
(vi VehicleAbstraction)
structural/bridge/main.go:45
↓ 2 callersMethodExecute
(f ExecuteStringFunc)
messaging/future/future/main.go:26
↓ 2 callersMethodGo
(g Game)
behavioral/template/main.go:15
↓ 2 callersMethodMaxSpeed
()
structural/bridge/main.go:10
↓ 2 callersMethodMoveTo
(x,y int)
behavioral/memento/main.go:21
↓ 2 callersMethodName
()
concurrency/subtasks/divide_and_conquer/divide_and_conquer.go:61
↓ 2 callersFunctionNew
New constructs a new Deadline with the given timeout.
stability/deadline/deadline.go:18
↓ 2 callersMethodNotify
Notify publishes new events to listeners. The method is not absolutely necessary, as each implementation could define this itself without losing funct
behavioral/observer/main.go:38
↓ 2 callersMethodOperate
(leftValue, rightValue int)
behavioral/strategy/main.go:12
↓ 2 callersFunctionProducer
(factor int, out chan<- int)
channel/producer_consumer/main.go:21
↓ 2 callersMethodPublish
发布一个主题
messaging/pubsub/main.go:86
↓ 2 callersMethodRegister
(l Observer)
behavioral/observer/main.go:58
↓ 2 callersMethodRelease
()
synchronization/semaphore2/main.go:31
↓ 2 callersMethodRemoveLast
()
behavioral/memento/main.go:52
↓ 2 callersMethodRestore
(m PlayerMemento)
behavioral/memento/main.go:33
↓ 2 callersMethodSave
()
behavioral/memento/main.go:26
↓ 2 callersMethodSayHi
()
playground/mocklib/robot.go:7
↓ 2 callersMethodSetBuilder
(b BuildProcess)
creational/builder/builder/main.go:36
↓ 2 callersMethodSetSeats
()
creational/builder/builder/main.go:14
↓ 2 callersMethodSetStructure
()
creational/builder/builder/main.go:15
↓ 2 callersMethodSetWheels
()
creational/builder/builder/main.go:13
↓ 2 callersMethodSpeak
()
playground/benchmark/main.go:9
↓ 2 callersMethodStart
(t GameType, player string)
behavioral/chain_of_responsibility/main.go:24
↓ 2 callersMethodSuccess
(f SuccessFunc)
messaging/future/future/main.go:16
↓ 2 callersMethodaddAlbumToRegistry
(album Album)
behavioral/interpreter/Interpreter.go:21
↓ 2 callersFunctionassertEqual
(t *testing.T, a interface{}, b interface{})
stability/deadline/deadline_test.go:9
↓ 2 callersFunctionfutureData
(url string)
messaging/future/main.go:14
↓ 2 callersFunctiongen
The first stage, gen, is a function that converts a list of integers to a channel that emits the integers in the list. The gen function starts a gorou
concurrency/pipeline/main.go:30
↓ 2 callersFunctiongenerator
(done <-chan interface{}, integers ...int)
concurrency/pipeline/pipeline_from_book/main.go:19
↓ 2 callersFunctionincCounter
(id int)
concurrency/atomic_functions/main.go:30
↓ 2 callersFunctionmakeRobotsSayHi
makeRobotsSayHi is used for making robots say hi
playground/mocklib/robot.go:41
↓ 2 callersFunctionmultiply
(done <-chan interface{}, intStream <-chan int, multiplier int)
concurrency/pipeline/pipeline_from_book/main.go:34
↓ 2 callersFunctionoutputText
(j *Job)
concurrency/concurrency_in_go/main.go:17
↓ 2 callersFunctionoutputText
(j *Job, goGroup *sync.WaitGroup)
concurrency/concurrency_in_go/ch1/ch1.go:15
↓ 2 callersFunctionplayer
(name string, table chan *Ball)
concurrency/pingpong/main.go:19
↓ 2 callersMethodprint
()
playground/interface-semantics/main.go:11
↓ 2 callersFunctionrun
()
concurrency/pipeline/pipeline_from_book/main.go:9
↓ 2 callersFunctionsay
(funcName string)
playground/factory/robot.go:7
↓ 2 callersFunctionsleepyGopherWithChan
(id int, c chan int)
playground/goroutine/basic_chan_test.go:20
↓ 2 callersFunctionsq
The second stage, sq, receives integers from a channel and returns a channel that emits the square of each received integer. After the inbound channel
messaging/fan_in_out/main.go:84
↓ 2 callersFunctionsq
(in <-chan int)
concurrency/pipeline/pipeline/main.go:32
↓ 2 callersFunctionsquareNumber
(in <-chan int)
messaging/fan/fan_in_out_test.go:40
↓ 2 callersFunctiontransaction
(amt int)
concurrency/race_detection/main.go:43
↓ 1 callersMethodAcquire
Acquire retrieves a resource from the pool. This method returns a resource from the pool if one is available, or creates a new one for the call.
workerpool/pool/main.go:60
↓ 1 callersMethodActiveRoutines
ActiveRoutines will return the number of routines performing work.
workerpool/ardan_labs_worker_pool/worker_pool.go:202
↓ 1 callersMethodAddGame
(games ...Game)
behavioral/chain_of_responsibility/main.go:20
↓ 1 callersMethodAddOne
()
creational/singleton/singleton.go:4
↓ 1 callersMethodApply
(int, int)
behavioral/strategy/main.go:4
↓ 1 callersMethodAquire
()
synchronization/semaphore2/main.go:30
↓ 1 callersMethodAttach
(observer AbstractObserver)
behavioral/observerpattern/main.go:34
↓ 1 callersMethodAttack
()
behavioral/command/main.go:27
↓ 1 callersMethodAwait
error for timeout if need
concurrency/barrier/n_barrier/main.go:10
↓ 1 callersMethodBefore
(context.Context)
messaging/fanout.go:69
↓ 1 callersMethodBuyAll
()
structural/facade/main.go:41
↓ 1 callersMethodCallCommands
()
behavioral/command/main.go:46
↓ 1 callersMethodClose
关闭发布者对象,同时关闭所有的订阅者管道。
messaging/pubsub/main.go:98
↓ 1 callersFunctionConsumer
(in <-chan int)
channel/producer_consumer/main.go:27
↓ 1 callersFunctionCreateVehicleFactory
(v int)
creational/abstract_factory/abstract_factory.go:13
↓ 1 callersMethodDetach
(observer AbstractObserver)
behavioral/observerpattern/main.go:38
↓ 1 callersFunctionDivideAndConquer
(data interface{}, evaluators []Evaluator, timeout time.Duration)
concurrency/subtasks/divide_and_conquer/divide_and_conquer.go:73
↓ 1 callersMethodDoWork
(workRoutine int)
workerpool/ardan_labs_worker_pool/worker_pool.go:121
↓ 1 callersFunctionDuration
(invocation time.Time, name string)
profiling/profile.go:9
↓ 1 callersMethodEscape
()
behavioral/command/main.go:28
next →1–100 of 583, ranked by callers