If you’re talking about keg hopping, then the using a hop bag (as a teabag) should work. I don‘t have a lot of experience with leaf hops, so maybe someone can help with how much to use.
As for shelf life, my 5ltr mini kegs don’t stick around too long for that to be an issue :beer1: