Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ardanlabs/kit
/ functions
Functions
292 in github.com/ardanlabs/kit
⨍
Functions
292
◇
Types & classes
115
↓ 1 callers
Method
execute
execute performs the work in a recoverable way.
pool/pool.go:266
↓ 1 callers
Method
findData
findData locates the data by walking the keys down the map
mapstructure/mapstructure.go:384
↓ 1 callers
Method
join
join takes a new connection and adds it to the manager.
tcp/tcp.go:458
↓ 1 callers
Method
manager
manager controls changes to the work pool including stats and shutting down.
pool/pool.go:323
↓ 1 callers
Function
newClient
newClient creates a new client for an incoming connection.
tcp/client.go:30
↓ 1 callers
Method
processor
processor provides the main program logic for the program.
runner/runner.go:93
↓ 1 callers
Method
read
read waits for a message and sends it to the user for procesing.
tcp/client.go:71
↓ 1 callers
Method
remove
remove deletes a connection from the manager.
tcp/tcp.go:480
↓ 1 callers
Method
reset
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 callers
Method
work
work performs the users work and keeps stats.
pool/pool.go:227
Function
API
API returns a handler for a set of routes.
examples/web/cmd/app/routes/routes.go:12
Function
Auth
Auth simulates a midware for authentication.
examples/web/internal/middleware/auth.go:13
Function
Benchmark_Decode
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:7
Function
Benchmark_DecodeBasic
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:30
Function
Benchmark_DecodeEmbedded
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:47
Function
Benchmark_DecodeMap
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:94
Function
Benchmark_DecodeMapOfStruct
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:109
Function
Benchmark_DecodeMetadata
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:181
Function
Benchmark_DecodeMetadataEmbedded
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:210
Function
Benchmark_DecodeSlice
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:123
Function
Benchmark_DecodeSliceOfStruct
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:135
Function
Benchmark_DecodeTagged
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:233
Function
Benchmark_DecodeTypeConversion
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:62
Function
Benchmark_DecodeWeaklyTypedInput
(b *testing.B)
mapstructure/mapstructure_benchmark_test.go:149
Method
Bind
Bind is called to init to reader and writer.
udp/udp_handlers_test.go:16
Method
Bind
Bind is called to set the reader and writer.
udp/handlers.go:31
Method
Bind
Bind is called to init to reader and writer.
examples/udp/handlers.go:17
Method
Bind
Bind is called to init a reader and writer.
examples/tcp/handlers.go:17
Method
Bind
Bind is called to init to reader and writer.
tcp/tcp_handlers_test.go:17
Function
Bool
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
Method
ClientStats
ClientStats return details for all active clients.
tcp/tcp.go:395
Method
Clients
Clients returns the number of active clients connected.
tcp/tcp.go:420
Method
Connections
Connections returns the number of client connections.
tcp/tcp.go:373
Function
Dev
Dev logs trace information for developers.
log/log_default.go:22
Function
DevOffset
DevOffset logs trace information for developers with a offset option to expand the caller level.
log/log_default.go:43
Function
DisplayLog
DisplayLog writes the Logdash data to standand out, if testing in verbose mode was turned on.
tests/tests.go:30
Method
DoCancel
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
Method
Drop
Drop will close the socket connection.
tcp/tcp.go:279
Function
Duration
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
Function
Error
Error logs trace information that are errors.
log/log_default.go:32
Function
Error
Error handles all error responses for the API.
web/reponse.go:65
Function
ErrorOffset
ErrorOffset logs trace information that are errors with a offset option to expand the caller level.
log/log_default.go:55
Function
Event
Event writes tcp events.
examples/tcp/main.go:47
Function
ExampleDecode
()
mapstructure/mapstructure_examples_test.go:8
Function
ExampleDecodePath
()
mapstructure/mapstructure_examples_test.go:148
Function
ExampleDecodeSlicePath
()
mapstructure/mapstructure_examples_test.go:222
Function
ExampleDecode_abstractField
()
mapstructure/mapstructure_examples_test.go:302
Function
ExampleDecode_embeddedSlice
()
mapstructure/mapstructure_examples_test.go:241
Function
ExampleDecode_errors
()
mapstructure/mapstructure_examples_test.go:39
Function
ExampleDecode_metadata
()
mapstructure/mapstructure_examples_test.go:73
Function
ExampleDecode_weaklyTypedInput
()
mapstructure/mapstructure_examples_test.go:112
Function
ExampleDev
ExampleDev shows how to use the log package.
log/log_examples_test.go:11
Function
ExampleGlobal
ExampleGlobal shows how to use the package level funcs of the config package.
cfg/cfg_examples_test.go:13
Function
ExampleNew
ExampleNew provides a basic example for using a pool.
pool/pool_test.go:29
Function
ExampleNew
ExampleNew shows how to create and use a new config which can be passed around.
cfg/cfg_examples_test.go:46
Function
ExampleRetrieveGeoNamesTimezone
ExampleRetrieveGeoNamesTimezone tests the call to the geonames timezone API.
timezone/timezone_test.go:24
Function
ExampleRetrieveGoogleTimezone
ExampleRetrieveGoogleTimezone tests the call to the google timezone API.
timezone/timezone_test.go:11
Function
Execute
Execute the MongoDB function using session and collection information.
examples/web/internal/sys/db/mongo.go:71
Function
Fatal
Fatal logs trace information for users and terminates the app.
log/log_default.go:37
Function
FatalOffset
FatalOffset logs trace information for users and terminates the app with a offset expand the caller level.
log/log_default.go:61
Method
Groom
Groom drops connections that are not active for the specified duration.
tcp/tcp.go:432
Method
Handle
Handle proxies the Handle function of the underlying App.
web/web.go:152
Function
IndentJSON
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
Function
Init
Init initializes the default logger to allow usage of the global log functions.
log/log_default.go:10
Function
Init
============================================================================== Init sets up the configuration and logging systems.
examples/web/internal/sys/app/app.go:24
Function
Init
============================================================================== Init sets up the MongoDB environment and provides a master session.
examples/web/internal/sys/db/mongo.go:31
Function
Init
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
Function
Int
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
Method
Job
Job is the implementation of the Jobber interface.
runner/runner_test.go:28
Method
Job
Job implements the Jobber interface so task can be managed.
examples/runner/main.go:54
Function
List
============================================================================== List retrieves a list of existing users from the database.
examples/web/internal/user/user.go:20
Function
Log
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
Function
Mongo
Mongo initializes the master session and wires in the connection middleware.
examples/web/internal/middleware/mongo.go:14
Function
MustBool
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
Function
MustDuration
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
Function
MustInt
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
Function
MustString
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
Function
MustTime
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
Function
MustURL
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
Function
New
New returns a new Runner value for use.
runner/runner.go:35
Function
New
New creates a new manager to service clients.
udp/udp.go:48
Function
New
New creates a new Pool.
pool/pool.go:98
Function
New
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
Function
New
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
Function
New
New creates a new manager to service clients.
tcp/tcp.go:78
Method
Process
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
Method
Process
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
Method
Process
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
Method
Process
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
Method
Process
Process is used to handle the processing of the message.
tcp/tcp_handlers_test.go:41
Method
Provide
Provide implements the Provider interface.
cfg/file_provider.go:16
Method
Provide
Provide implements the Provider interface.
cfg/map_provider.go:10
Method
Provide
Provide implements the Provider interface.
cfg/env_provider.go:17
Function
Query
Query provides a string version of the value
examples/web/internal/sys/db/mongo.go:61
Method
Read
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
Method
Read
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
Method
Read
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
Method
Read
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
Method
Read
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
Function
RequestLogger
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
← previous
next →
101–200 of 292, ranked by callers