# OrleansService

- Module: [Aspire.Hosting.Orleans](/reference/api/go/aspire.hosting.orleans.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Describes an Orleans service.

## Definition

```go
type OrleansService interface{}
```

## Methods

- [AsClient](/reference/api/go/aspire.hosting.orleans/orleansservice/asclient.md) -- `method` -- Returns a model of the clients of an Orleans service.
  ```go
  AsClient() OrleansServiceClient
  ```
- [WithBroadcastChannel](/reference/api/go/aspire.hosting.orleans/orleansservice/withbroadcastchannel.md) -- `method` -- Adds a broadcast channel provider to the Orleans service.
  ```go
  WithBroadcastChannel(name string) OrleansService
  ```
- [WithClusterId](/reference/api/go/aspire.hosting.orleans/orleansservice/withclusterid.md) -- `method` -- Sets the ClusterId of the Orleans service.
  ```go
  WithClusterId(clusterId string) OrleansService
  ```
- [WithClustering](/reference/api/go/aspire.hosting.orleans/orleansservice/withclustering.md) -- `method` -- Configures the Orleans service to use the provided clustering provider.
  ```go
  WithClustering(provider ResourceWithConnectionString) OrleansService
  ```
- [WithDevelopmentClustering](/reference/api/go/aspire.hosting.orleans/orleansservice/withdevelopmentclustering.md) -- `method` -- Configures the Orleans service to use development-only clustering.
  ```go
  WithDevelopmentClustering() OrleansService
  ```
- [WithGrainDirectory](/reference/api/go/aspire.hosting.orleans/orleansservice/withgraindirectory.md) -- `method` -- Adds a grain directory provider to the Orleans service.
  ```go
  WithGrainDirectory(name string, provider ResourceWithConnectionString) OrleansService
  ```
- [WithGrainStorage](/reference/api/go/aspire.hosting.orleans/orleansservice/withgrainstorage.md) -- `method` -- Adds a grain storage provider to the Orleans service.
  ```go
  WithGrainStorage(name string, provider ResourceWithConnectionString) OrleansService
  ```
- [WithMemoryGrainStorage](/reference/api/go/aspire.hosting.orleans/orleansservice/withmemorygrainstorage.md) -- `method` -- Adds an in-memory grain storage to the Orleans service.
  ```go
  WithMemoryGrainStorage(name string) OrleansService
  ```
- [WithMemoryReminders](/reference/api/go/aspire.hosting.orleans/orleansservice/withmemoryreminders.md) -- `method` -- Configures in-memory reminder storage for the Orleans service.
  ```go
  WithMemoryReminders() OrleansService
  ```
- [WithMemoryStreaming](/reference/api/go/aspire.hosting.orleans/orleansservice/withmemorystreaming.md) -- `method` -- Adds an in-memory stream provider to the Orleans service.
  ```go
  WithMemoryStreaming(name string) OrleansService
  ```
- [WithReminders](/reference/api/go/aspire.hosting.orleans/orleansservice/withreminders.md) -- `method` -- Configures reminder storage for the Orleans service.
  ```go
  WithReminders(provider ResourceWithConnectionString) OrleansService
  ```
- [WithServiceId](/reference/api/go/aspire.hosting.orleans/orleansservice/withserviceid.md) -- `method` -- Sets the ServiceId of the Orleans service.
  ```go
  WithServiceId(serviceId string) OrleansService
  ```
- [WithStreaming](/reference/api/go/aspire.hosting.orleans/orleansservice/withstreaming.md) -- `method` -- Adds a stream provider to the Orleans service.
  ```go
  WithStreaming(name string, provider ResourceWithConnectionString) OrleansService
  ```
