If you fill the keg carefully, following the correct procedures, then it will "keep" just as long as it would have if you had bottled it. How long that is depends on the style of beer, some benefit from aging, some suffer from it.
But a 3 gallon keg? I have a hard time picturing that lasting...