MCPcopy Create free account

hub / github.com/ardanlabs/kit / functions

Functions292 in github.com/ardanlabs/kit

↓ 1 callersMethodexecute
execute performs the work in a recoverable way.
pool/pool.go:266
↓ 1 callersMethodfindData
findData locates the data by walking the keys down the map
mapstructure/mapstructure.go:384
↓ 1 callersMethodjoin
join takes a new connection and adds it to the manager.
tcp/tcp.go:458
↓ 1 callersMethodmanager
manager controls changes to the work pool including stats and shutting down.
pool/pool.go:323
↓ 1 callersFunctionnewClient
newClient creates a new client for an incoming connection.
tcp/client.go:30
↓ 1 callersMethodprocessor
processor provides the main program logic for the program.
runner/runner.go:93
↓ 1 callersMethodread
read waits for a message and sends it to the user for procesing.
tcp/client.go:71
↓ 1 callersMethodremove
remove deletes a connection from the manager.
tcp/tcp.go:480
↓ 1 callersMethodreset
Reset re-adjusts the pool to match the specified number of routines. NOTE: since our pools are auto-adjustable, we will not give the user ability to r
pool/pool.go:217
↓ 1 callersMethodwork
work performs the users work and keeps stats.
pool/pool.go:227
FunctionAPI
API returns a handler for a set of routes.
examples/web/cmd/app/routes/routes.go:12
FunctionAuth
Auth simulates a midware for authentication.
examples/web/internal/middleware/auth.go:13
FunctionBenchmark_Decode
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:7
FunctionBenchmark_DecodeBasic
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:30
FunctionBenchmark_DecodeEmbedded
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:47
FunctionBenchmark_DecodeMap
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:94
FunctionBenchmark_DecodeMapOfStruct
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:109
FunctionBenchmark_DecodeMetadata
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:181
FunctionBenchmark_DecodeMetadataEmbedded
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:210
FunctionBenchmark_DecodeSlice
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:123
FunctionBenchmark_DecodeSliceOfStruct
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:135
FunctionBenchmark_DecodeTagged
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:233
FunctionBenchmark_DecodeTypeConversion
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:62
FunctionBenchmark_DecodeWeaklyTypedInput
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:149
MethodBind
Bind is called to init to reader and writer.
udp/udp_handlers_test.go:16
MethodBind
Bind is called to set the reader and writer.
udp/handlers.go:31
MethodBind
Bind is called to init to reader and writer.
examples/udp/handlers.go:17
MethodBind
Bind is called to init a reader and writer.
examples/tcp/handlers.go:17
MethodBind
Bind is called to init to reader and writer.
tcp/tcp_handlers_test.go:17
FunctionBool
Bool calls the default Config and returns the bool value of a given key as a bool. It will return an error if the key was not found or the value can't
cfg/cfg_default.go:96
MethodClientStats
ClientStats return details for all active clients.
tcp/tcp.go:395
MethodClients
Clients returns the number of active clients connected.
tcp/tcp.go:420
MethodConnections
Connections returns the number of client connections.
tcp/tcp.go:373
FunctionDev
Dev logs trace information for developers.
log/log_default.go:22
FunctionDevOffset
DevOffset logs trace information for developers with a offset option to expand the caller level.
log/log_default.go:43
FunctionDisplayLog
DisplayLog writes the Logdash data to standand out, if testing in verbose mode was turned on.
tests/tests.go:30
MethodDoCancel
DoCancel waits for the goroutine pool to take the work to be executed or gives up if the Context is cancelled. Only use when you want to throw away wo
pool/pool.go:157
MethodDrop
Drop will close the socket connection.
tcp/tcp.go:279
FunctionDuration
Duration calls the default Config and returns the value of the given key as a duration. It will return an error if the key was not found or the value
cfg/cfg_default.go:134
FunctionError
Error logs trace information that are errors.
log/log_default.go:32
FunctionError
Error handles all error responses for the API.
web/reponse.go:65
FunctionErrorOffset
ErrorOffset logs trace information that are errors with a offset option to expand the caller level.
log/log_default.go:55
FunctionEvent
Event writes tcp events.
examples/tcp/main.go:47
FunctionExampleDecode
()
mapstructure/mapstructure_examples_test.go:8
FunctionExampleDecodePath
()
mapstructure/mapstructure_examples_test.go:148
FunctionExampleDecodeSlicePath
()
mapstructure/mapstructure_examples_test.go:222
FunctionExampleDecode_abstractField
()
mapstructure/mapstructure_examples_test.go:302
FunctionExampleDecode_embeddedSlice
()
mapstructure/mapstructure_examples_test.go:241
FunctionExampleDecode_errors
()
mapstructure/mapstructure_examples_test.go:39
FunctionExampleDecode_metadata
()
mapstructure/mapstructure_examples_test.go:73
FunctionExampleDecode_weaklyTypedInput
()
mapstructure/mapstructure_examples_test.go:112
FunctionExampleDev
ExampleDev shows how to use the log package.
log/log_examples_test.go:11
FunctionExampleGlobal
ExampleGlobal shows how to use the package level funcs of the config package.
cfg/cfg_examples_test.go:13
FunctionExampleNew
ExampleNew provides a basic example for using a pool.
pool/pool_test.go:29
FunctionExampleNew
ExampleNew shows how to create and use a new config which can be passed around.
cfg/cfg_examples_test.go:46
FunctionExampleRetrieveGeoNamesTimezone
ExampleRetrieveGeoNamesTimezone tests the call to the geonames timezone API.
timezone/timezone_test.go:24
FunctionExampleRetrieveGoogleTimezone
ExampleRetrieveGoogleTimezone tests the call to the google timezone API.
timezone/timezone_test.go:11
FunctionExecute
Execute the MongoDB function using session and collection information.
examples/web/internal/sys/db/mongo.go:71
FunctionFatal
Fatal logs trace information for users and terminates the app.
log/log_default.go:37
FunctionFatalOffset
FatalOffset logs trace information for users and terminates the app with a offset expand the caller level.
log/log_default.go:61
MethodGroom
Groom drops connections that are not active for the specified duration.
tcp/tcp.go:432
MethodHandle
Handle proxies the Handle function of the underlying App.
web/web.go:152
FunctionIndentJSON
IndentJSON takes a JSON payload as a string and re-indents it to make comparing expected strings to tests strings during testing.
tests/tests.go:40
FunctionInit
Init initializes the default logger to allow usage of the global log functions.
log/log_default.go:10
FunctionInit
============================================================================== Init sets up the configuration and logging systems.
examples/web/internal/sys/app/app.go:24
FunctionInit
============================================================================== Init sets up the MongoDB environment and provides a master session.
examples/web/internal/sys/db/mongo.go:31
FunctionInit
Init populates the package's default Config and should be called only once. A Provider must be supplied which will return a map of key/value pairs to
cfg/cfg_default.go:15
FunctionInt
Int calls the Default config and returns the value of the given key as an int. It will return an error if the key was not found or the value can't be
cfg/cfg_default.go:58
MethodJob
Job is the implementation of the Jobber interface.
runner/runner_test.go:28
MethodJob
Job implements the Jobber interface so task can be managed.
examples/runner/main.go:54
FunctionList
============================================================================== List retrieves a list of existing users from the database.
examples/web/internal/user/user.go:20
FunctionLog
Log returns a string to help with logging the package's default Config. It excludes any values whose key contains the string "PASS".
cfg/cfg_default.go:33
FunctionMongo
Mongo initializes the master session and wires in the connection middleware.
examples/web/internal/middleware/mongo.go:14
FunctionMustBool
MustBool calls the default Config and returns the bool value of a given key as a bool. It will panic if the key was not found or the value can't be co
cfg/cfg_default.go:103
FunctionMustDuration
MustDuration calls the default Config and returns the value of the given key as a MustDuration. It will panic if the key was not found or the value ca
cfg/cfg_default.go:141
FunctionMustInt
MustInt calls the default Config and returns the value of the given key as an int. It will panic if the key was not found or the value can't be conver
cfg/cfg_default.go:65
FunctionMustString
MustString calls the default Config and returns the value of the given key as a string, else it will panic if the key was not found.
cfg/cfg_default.go:45
FunctionMustTime
MustTime calls the default Config ang returns the value of the given key as a Time. It will panic if the key was not found or the value can't be conve
cfg/cfg_default.go:84
FunctionMustURL
MustURL calls the default Config and returns the value of the given key as a URL. It will panic if the key was not found or the value can't be convert
cfg/cfg_default.go:122
FunctionNew
New returns a new Runner value for use.
runner/runner.go:35
FunctionNew
New creates a new manager to service clients.
udp/udp.go:48
FunctionNew
New creates a new Pool.
pool/pool.go:98
FunctionNew
New populates a new Config from a Provider. It will return an error if there was any problem reading from the Provider.
cfg/cfg.go:28
FunctionNew
New create an App value that handle a set of routes for the application. You can provide any number of middleware and they'll be used to wrap every re
web/web.go:83
FunctionNew
New creates a new manager to service clients.
tcp/tcp.go:78
MethodProcess
Process is used to handle the processing of the message. This method is called on a routine from a pool of routines.
udp/udp_handlers_test.go:42
MethodProcess
Process is used to handle the processing of the request. This method is called on a routine from a pool of routines.
udp/handlers.go:45
MethodProcess
Process is used to handle the processing of the message. This method is called on a routine from a pool of routines.
examples/udp/handlers.go:45
MethodProcess
Process is used to handle the processing of the message. This method is called on a routine from a pool of routines.
examples/tcp/handlers.go:44
MethodProcess
Process is used to handle the processing of the message.
tcp/tcp_handlers_test.go:41
MethodProvide
Provide implements the Provider interface.
cfg/file_provider.go:16
MethodProvide
Provide implements the Provider interface.
cfg/map_provider.go:10
MethodProvide
Provide implements the Provider interface.
cfg/env_provider.go:17
FunctionQuery
Query provides a string version of the value
examples/web/internal/sys/db/mongo.go:61
MethodRead
Read implements the udp.ReqHandler interface. It is provided a request value to popular and a io.Reader that was created in the Bind above.
udp/udp_handlers_test.go:25
MethodRead
Read is provided the user-defined reader and must return the data read off the wire and the length. Returning io.EOF or a non temporary error will sho
udp/handlers.go:41
MethodRead
Read implements the udp.ReqHandler interface. It is provided a request value to popular and a io.Reader that was created in the Bind above.
examples/udp/handlers.go:26
MethodRead
Read implements the tcp.ReqHandler interface. It is provided a request value to populate and a io.Reader that was created in the Bind above.
examples/tcp/handlers.go:26
MethodRead
Read implements the udp.ReqHandler interface. It is provided a request value to popular and a io.Reader that was created in the Bind above.
tcp/tcp_handlers_test.go:26
FunctionRequestLogger
RequestLogger writes some information about the request to the logs in the format: TraceID : (200) GET /foo -> IP ADDR (latency)
examples/web/internal/middleware/request_logger.go:18
← previousnext →101–200 of 292, ranked by callers