rpc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 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.Client, url, fromStorage string) error

func ProxyServe

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

Types

type AgentClient

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

func NewAgentClient

func NewAgentClient(client *redis.Client) *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.Client) 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