falcosecurity / plugin-sdk-cpp

Falco plugins SDK for C++
Apache License 2.0
3 stars 10 forks source link

create handy constructors for exported structs #11

Closed jasondellaluce closed 1 year ago

jasondellaluce commented 2 years ago

Motivation

Exported structs, such as falcosecurity::event_sourcer::open_param and falcosecurity::field_extractor::field, are mostly used in vectors or other std collections, but can't currently be declared inline. This makes code more verbose and less concise.

Feature

Supporting a notation such as:

std::vector<falcosecurity::field_extractor::field> fields = {
    {"example.count", FTYPE_UINT64, "some desc", "some display"},
};

That should be equivalent to the more verbose that we currently have:

falcosecurity::field_extractor::field f;
f.name = "example.count";
f.type = FTYPE_UINT64;
f.description = "some desc";
f.display = "some display";

std::vector<falcosecurity::field_extractor::field> fields;
fields.push_back(f);
poiana commented 1 year ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

jasondellaluce commented 1 year ago

/remove-lifecycle stale

poiana commented 1 year ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

jasondellaluce commented 1 year ago

/remove-lifecycle stale

poiana commented 1 year ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale