diff --git a/actor.go b/actor.go index b9ad25e..90418eb 100644 --- a/actor.go +++ b/actor.go @@ -29,6 +29,14 @@ type Actor interface { Type() string } +// Named is any object with a name. +type Named() string { + // Name returns the name. This doesn't need to be the same as Type. It + // must return the same string every time. It is used to differentiate + // actors of the same type in logs. + Name() string +} + // FlagAdder is any object that can add [Flag]s to a [FlagSet]. Actors which // implement this interface will be called upon to add flags during and only // during the flag parsing phase.