rpc

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentServe

func AgentServe(ctx context.Context, client redis.UniversalClient, url, fromStorage string) error

func ProxyServe

func ProxyServe(ctx context.Context, client redis.UniversalClient, proxy Proxy) error

Types

type AgentClient

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

func NewAgentClient

func NewAgentClient(client redis.UniversalClient) *AgentClient

func (*AgentClient) Ping

func (a *AgentClient) Ping(ctx context.Context) ([]AgentInfo, error)

type AgentInfo

type AgentInfo struct {
	URL         string
	FromStorage string
}

type GetCredentialsResp

type GetCredentialsResp struct {
	Address string
	Creds   map[string]s3.CredentialsV4
}

type Proxy

type Proxy interface {
	GetCredentials(ctx context.Context) (*pb.GetProxyCredentialsResponse, error)
}

func NewProxyClient

func NewProxyClient(client redis.UniversalClient) Proxy

type ProxyClient

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

func (*ProxyClient) GetCredentials

func (c *ProxyClient) GetCredentials(ctx context.Context) (*pb.GetProxyCredentialsResponse, error)

type ProxyGetCredentials

type ProxyGetCredentials func(ctx context.Context) (*pb.GetProxyCredentialsResponse, error)

func (ProxyGetCredentials) GetCredentials

Jump to

Keyboard shortcuts

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