provider

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOffchainProvider

type ClientOffchainProvider struct {
	// contains filtered or unexported fields
}

ClientOffchainProvider is a JD provider that connects to a Job Distributor service via gRPC.

func NewClientOffchainProvider

func NewClientOffchainProvider(config ClientOffchainProviderConfig) *ClientOffchainProvider

NewClientOffchainProvider creates a new ClientOffchainProvider with the given configuration.

func (*ClientOffchainProvider) Initialize

Initialize initializes the ClientOffchainProvider, setting up the JD client with the provided configuration. It returns the initialized deployment.OffchainClient or an error if initialization fails.

func (*ClientOffchainProvider) Name

Name returns the name of the ClientOffchainProvider.

func (*ClientOffchainProvider) OffchainClient

func (p *ClientOffchainProvider) OffchainClient() deployment.OffchainClient

OffchainClient returns the JD client instance managed by this provider. You must call Initialize before using this method to ensure the client is properly set up.

type ClientOffchainProviderConfig

type ClientOffchainProviderConfig struct {
	// Required: The gRPC URL to connect to the Job Distributor service.
	GRPC string
	// Optional: The WebSocket RPC URL for the Job Distributor service.
	WSRPC string
	// Optional: Transport credentials for secure gRPC connections. Defaults to insecure.NewCredentials()
	Creds credentials.TransportCredentials
	// Optional: OAuth2 token source for authentication.
	Auth oauth2.TokenSource
}

ClientOffchainProviderConfig holds the configuration to initialize the ClientOffchainProvider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL