GoToSocial/vendor/github.com/godbus/dbus/v5
Daniele Sluijters acc333c40b
[feature] Inherit resource limits from cgroups (#1336)
When GTS is running in a container runtime which has configured CPU or
memory limits or under an init system that uses cgroups to impose CPU
and memory limits the values the Go runtime sees for GOMAXPROCS and
GOMEMLIMIT are still based on the host resources, not the cgroup.

At least for the throttling middlewares which use GOMAXPROCS to
configure their queue size, this can result in GTS running with values
too big compared to the resources that will actuall be available to it.

This introduces 2 dependencies which can pick up resource contraints
from the current cgroup and tune the Go runtime accordingly. This should
result in the different queues being appropriately sized and in general
more predictable performance. These dependencies are a no-op on
non-Linux systems or if running in a cgroup that doesn't set a limit on
CPU or memory.

The automatic tuning of GOMEMLIMIT can be disabled by either explicitly
setting GOMEMLIMIT yourself or by setting AUTOMEMLIMIT=off. The
automatic tuning of GOMAXPROCS can similarly be counteracted by setting
GOMAXPROCS yourself.
2023-01-17 20:59:04 +00:00
..
CONTRIBUTING.md [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
LICENSE [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
MAINTAINERS [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
README.markdown [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
auth.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
auth_anonymous.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
auth_external.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
auth_sha1.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
call.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
conn.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
conn_darwin.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
conn_other.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
conn_unix.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
conn_windows.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
dbus.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
decoder.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
default_handler.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
doc.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
encoder.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
export.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
homedir.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
homedir_dynamic.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
homedir_static.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
match.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
message.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
object.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
sequence.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
sequential_handler.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
server_interfaces.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
sig.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_darwin.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_generic.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_nonce_tcp.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_tcp.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_unix.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_unixcred_dragonfly.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_unixcred_freebsd.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_unixcred_linux.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
transport_unixcred_openbsd.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
variant.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
variant_lexer.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00
variant_parser.go [feature] Inherit resource limits from cgroups (#1336) 2023-01-17 20:59:04 +00:00

README.markdown

Build Status

dbus

dbus is a simple library that implements native Go client bindings for the D-Bus message bus system.

Features

  • Complete native implementation of the D-Bus message protocol
  • Go-like API (channels for signals / asynchronous method calls, Goroutine-safe connections)
  • Subpackages that help with the introspection / property interfaces

Installation

This packages requires Go 1.7. If you installed it and set up your GOPATH, just run:

go get github.com/godbus/dbus

If you want to use the subpackages, you can install them the same way.

Usage

The complete package documentation and some simple examples are available at godoc.org. Also, the _examples directory gives a short overview over the basic usage.

Projects using godbus

  • notify provides desktop notifications over dbus into a library.
  • go-bluetooth provides a bluetooth client over bluez dbus API.
  • playerbm a bookmark utility for media players.
  • iwd go bindings for the internet wireless daemon "iwd".

Please note that the API is considered unstable for now and may change without further notice.

License

go.dbus is available under the Simplified BSD License; see LICENSE for the full text.

Nearly all of the credit for this library goes to github.com/guelfey/go.dbus.