Documentation ¶
Index ¶
- type HasLookupFileIdFunction
- type Location
- type LookupFileIdFunctionType
- type MasterClient
- func (mc *MasterClient) FindLeaderFromOtherPeers(myMasterAddress pb.ServerAddress) (leader string)
- func (vc MasterClient) GetLocations(vid uint32) (locations []Location, found bool)
- func (vc MasterClient) GetLocationsClone(vid uint32) (locations []Location, found bool)
- func (mc *MasterClient) GetLookupFileIdFunction() LookupFileIdFunctionType
- func (mc *MasterClient) GetMaster(ctx context.Context) pb.ServerAddress
- func (mc *MasterClient) GetMasters(ctx context.Context) []pb.ServerAddress
- func (vc MasterClient) GetVidLocations(vid string) (locations []Location, err error)
- func (mc *MasterClient) KeepConnectedToMaster(ctx context.Context)
- func (vc MasterClient) LookupFileId(fileId string) (fullUrls []string, err error)
- func (mc *MasterClient) LookupFileIdWithFallback(fileId string) (fullUrls []string, err error)
- func (vc MasterClient) LookupVolumeServerUrl(vid string) (serverUrls []string, err error)
- func (mc *MasterClient) SetOnPeerUpdateFn(onPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time))
- func (mc *MasterClient) WaitUntilConnected(ctx context.Context)
- func (mc *MasterClient) WithClient(streamingMode bool, fn func(client master_pb.SeaweedClient) error) error
- func (mc *MasterClient) WithClientCustomGetMaster(getMasterF func() pb.ServerAddress, streamingMode bool, ...) error
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 MasterClient ¶
type MasterClient struct { FilerGroup string OnPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time) OnPeerUpdateLock sync.RWMutex // contains filtered or unexported fields }
func NewMasterClient ¶
func NewMasterClient(grpcDialOption grpc.DialOption, filerGroup string, clientType string, clientHost pb.ServerAddress, clientDataCenter string, rack string, masters pb.ServerDiscovery) *MasterClient
func (*MasterClient) FindLeaderFromOtherPeers ¶
func (mc *MasterClient) FindLeaderFromOtherPeers(myMasterAddress pb.ServerAddress) (leader string)
func (MasterClient) GetLocations ¶
func (MasterClient) GetLocationsClone ¶
func (*MasterClient) GetLookupFileIdFunction ¶
func (mc *MasterClient) GetLookupFileIdFunction() LookupFileIdFunctionType
func (*MasterClient) GetMaster ¶
func (mc *MasterClient) GetMaster(ctx context.Context) pb.ServerAddress
func (*MasterClient) GetMasters ¶
func (mc *MasterClient) GetMasters(ctx context.Context) []pb.ServerAddress
func (MasterClient) GetVidLocations ¶
func (*MasterClient) KeepConnectedToMaster ¶
func (mc *MasterClient) KeepConnectedToMaster(ctx context.Context)
func (MasterClient) LookupFileId ¶
func (*MasterClient) LookupFileIdWithFallback ¶
func (mc *MasterClient) LookupFileIdWithFallback(fileId string) (fullUrls []string, err error)
func (MasterClient) LookupVolumeServerUrl ¶
func (*MasterClient) SetOnPeerUpdateFn ¶
func (mc *MasterClient) SetOnPeerUpdateFn(onPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time))
func (*MasterClient) WaitUntilConnected ¶
func (mc *MasterClient) WaitUntilConnected(ctx context.Context)
func (*MasterClient) WithClient ¶
func (mc *MasterClient) WithClient(streamingMode bool, fn func(client master_pb.SeaweedClient) error) error
func (*MasterClient) WithClientCustomGetMaster ¶
func (mc *MasterClient) WithClientCustomGetMaster(getMasterF func() pb.ServerAddress, streamingMode bool, fn func(client master_pb.SeaweedClient) error) error
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. |
Click to show internal directories.
Click to hide internal directories.