diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2020-08-27 15:45:02 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-27 15:46:44 -0700 |
commit | 6f8fb7e0db2790ff1f5ba835780c03fe245e437f (patch) | |
tree | ac9514f801e358e5397fe983053705e1320ccf7b /runsc/config/config.go | |
parent | 29d528399cf93ea2f27afe245738ae13ed4deace (diff) |
Improve type safety for socket options
The existing implementation for {G,S}etSockOpt take arguments of an
empty interface type which all types (implicitly) implement; any
type may be passed to the functions.
This change introduces marker interfaces for socket options that may be
set or queried which socket option types implement to ensure that invalid
types are caught at compile time. Different interfaces are used to allow
the compiler to enforce read-only or set-only socket options.
Fixes #3714.
RELNOTES: n/a
PiperOrigin-RevId: 328832161
Diffstat (limited to 'runsc/config/config.go')
0 files changed, 0 insertions, 0 deletions