Documentation
    Preparing search index...

    Interface ActorOptions<Registry, ActorName>

    Options for configuring a actor in RivetKit.

    interface ActorOptions<
        Registry extends AnyActorRegistry,
        ActorName extends keyof ExtractActorsFromRegistry<Registry>,
    > {
        createInRegion?: string;
        createWithInput?: unknown;
        enabled?: boolean;
        key: string | string[];
        name: ActorName;
        params?: Registry[ExtractActorsFromRegistry<Registry>]["params"];
    }

    Type Parameters

    Index

    Properties

    createInRegion?: string

    Region to create the actor in if it doesn't exist.

    createWithInput?: unknown

    Input data to pass to the actor.

    enabled?: boolean

    Whether the actor is enabled. Defaults to true.

    key: string | string[]

    Unique key for the actor instance. This can be a string or an array of strings to create multiple instances.

    "abc" or ["abc", "def"]
    
    name: ActorName

    Typesafe name of the actor. This should match the actor's name in the app's actor definitions.

    "chatRoom"
    
    params?: Registry[ExtractActorsFromRegistry<Registry>]["params"]

    Parameters for the actor.