mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
2294c55bd9
<!-- If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting. -->
35 lines
635 B
Go
35 lines
635 B
Go
package aibridged
|
|
|
|
import (
|
|
"context"
|
|
|
|
"storj.io/drpc"
|
|
|
|
"github.com/coder/coder/v2/enterprise/aibridged/proto"
|
|
)
|
|
|
|
type Dialer func(ctx context.Context) (DRPCClient, error)
|
|
|
|
type ClientFunc func() (DRPCClient, error)
|
|
|
|
// DRPCClient is the union of various service interfaces the client must support.
|
|
type DRPCClient interface {
|
|
proto.DRPCRecorderClient
|
|
proto.DRPCMCPConfiguratorClient
|
|
proto.DRPCAuthorizerClient
|
|
}
|
|
|
|
var _ DRPCClient = &Client{}
|
|
|
|
type Client struct {
|
|
proto.DRPCRecorderClient
|
|
proto.DRPCMCPConfiguratorClient
|
|
proto.DRPCAuthorizerClient
|
|
|
|
Conn drpc.Conn
|
|
}
|
|
|
|
func (c *Client) DRPCConn() drpc.Conn {
|
|
return c.Conn
|
|
}
|