wdclient

package
v0.0.0-...-5c6c1e7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HasLookupFileIdFunction

type HasLookupFileIdFunction interface {
	GetLookupFileIdFunction() LookupFileIdFunctionType
}

type Location

type Location struct {
	Url        string `json:"url,omitempty"`
	PublicUrl  string `json:"publicUrl,omitempty"`
	DataCenter string `json:"dataCenter,omitempty"`
	GrpcPort   int    `json:"grpcPort,omitempty"`
}

func (Location) ServerAddress

func (l Location) ServerAddress() pb.ServerAddress

type LookupFileIdFunctionType

type LookupFileIdFunctionType func(fileId string) (targetUrls []string, err error)

type MasterClient

type MasterClient struct {
	FilerGroup string

	OnPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time)
	// contains filtered or unexported fields
}

func NewMasterClient

func NewMasterClient(grpcDialOption grpc.DialOption, filerGroup string, clientType string, clientHost pb.ServerAddress, clientDataCenter string, rack string, masters map[string]pb.ServerAddress) *MasterClient

func (*MasterClient) FindLeaderFromOtherPeers

func (mc *MasterClient) FindLeaderFromOtherPeers(myMasterAddress pb.ServerAddress) (leader string)

func (*MasterClient) GetLocations

func (vc *MasterClient) GetLocations(vid uint32) (locations []Location, found bool)

func (*MasterClient) GetLookupFileIdFunction

func (mc *MasterClient) GetLookupFileIdFunction() LookupFileIdFunctionType

func (*MasterClient) GetMaster

func (mc *MasterClient) GetMaster() pb.ServerAddress

func (*MasterClient) GetMasters

func (mc *MasterClient) GetMasters() map[string]pb.ServerAddress

func (*MasterClient) GetVidLocations

func (vc *MasterClient) GetVidLocations(vid string) (locations []Location, err error)

func (*MasterClient) KeepConnectedToMaster

func (mc *MasterClient) KeepConnectedToMaster()

func (*MasterClient) LookupFileId

func (vc *MasterClient) LookupFileId(fileId string) (fullUrls []string, err error)

func (*MasterClient) LookupFileIdWithFallback

func (mc *MasterClient) LookupFileIdWithFallback(fileId string) (fullUrls []string, err error)

func (*MasterClient) LookupVolumeServerUrl

func (vc *MasterClient) LookupVolumeServerUrl(vid string) (serverUrls []string, err error)

func (*MasterClient) WaitUntilConnected

func (mc *MasterClient) WaitUntilConnected()

func (*MasterClient) WithClient

func (mc *MasterClient) WithClient(streamingMode bool, fn func(client master_pb.SeaweedClient) error) error

type VolumeTcpClient

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

VolumeTcpClient put/get/delete file chunks directly on volume servers without replication

func NewVolumeTcpClient

func NewVolumeTcpClient() *VolumeTcpClient

func (*VolumeTcpClient) PutFileChunk

func (c *VolumeTcpClient) PutFileChunk(volumeServerAddress string, fileId string, fileSize uint32, fileReader io.Reader) (err error)

type VolumeTcpConn

type VolumeTcpConn struct {
	net.Conn
	// contains filtered or unexported fields
}

Directories

Path Synopsis
net2 is a collection of functions meant to supplement the capabilities provided by the standard "net" package.
net2 is a collection of functions meant to supplement the capabilities provided by the standard "net" package.
A generic resource pool for managing resources such as network connections.
A generic resource pool for managing resources such as network connections.

Jump to

Keyboard shortcuts

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