Documentation
¶
Index ¶
- type Config
- type Master
- func (m *Master) Addr() url.URL
- func (m *Master) Close() error
- func (m *Master) Config() (map[string]any, error)
- func (m *Master) FindVolumes(ctx context.Context, collection string, fileID string) ([]url.URL, error)
- func (m *Master) GRPCAddr() string
- func (m *Master) ID() client.ID
- func (m *Master) Name() string
- func (m *Master) PB() master_pb.SeaweedClient
- func (m *Master) Ready(ctx context.Context) (any, error)
- func (m *Master) String() string
- func (m *Master) VolumeAddresses(ctx context.Context) ([]url.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Leader string `json:"leader"` MetricsIntervalSeconds uint32 `json:"metrics_interval_seconds"` VolumePreallocate bool `json:"volume_preallocate"` VolumeSizeLimitMB uint32 `json:"volume_size_limit_m_b"` }
Config represents Master server configuration attributes.
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master represents a connection to a SeaweedFS master server.
func New ¶
New creates a new API client for performing operations on a SeaweedFS master server with the provided address.
func (*Master) Addr ¶
Addr returns the url.URL representing the HTTP/S address for the server that the Master API client is connected to.
func (*Master) Config ¶
Config returns the configuration attributes for the server the Master API client is connected to.
func (*Master) FindVolumes ¶
func (m *Master) FindVolumes(ctx context.Context, collection string, fileID string) ([]url.URL, error)
FindVolumes returns the list of volume server URLs that have data associated with provided collection and file ID.
func (*Master) GRPCAddr ¶
GRPCAddr returns the gRPC target for the server that the Master API client is connected to.
func (*Master) PB ¶
func (m *Master) PB() master_pb.SeaweedClient
PB returns the protobuf interface for the Master API client.
func (*Master) Ready ¶
Ready returns the master server configuration indicating that the API client has established a connection.
An error will be returned if the configuration could not be retrieved.