Documentation
¶
Index ¶
- Variables
- func LoadTLSConfigFromDir(configDir string) (*tls.Config, error)
- func LogRequests(log *zap.Logger, h http.Handler, insecureLogPaths bool) http.Handler
- func LogResponses(log *zap.Logger, h http.Handler, insecureLogAll bool) http.Handler
- func NewMultiTenantGateway(gateway minio.Gateway, connectionPool *rpcpool.Pool, config uplink.Config, ...) minio.Gateway
- type AuthClient
- type Config
- type GetAccessResponse
- type MinioSystemLogTarget
- type Server
Constants ¶
This section is empty.
Variables ¶
var AuthError = errs.Class("authclient")
AuthError is the default error class for auth clients.
var ( // ErrAccessGrant occurs when failing to parse the access grant from the // request. ErrAccessGrant = errs.Class("access grant") )
var ( // Error is an error class for internal Multinode Dashboard http server error. Error = errs.Class("gateway") )
Functions ¶
func LoadTLSConfigFromDir ¶
LoadTLSConfigFromDir reads a directory and loads certificates it contains.
func LogRequests ¶ added in v1.8.0
LogRequests logs requests.
func LogResponses ¶ added in v1.8.0
LogResponses logs responses.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
AuthClient communicates with the Auth Service.
func NewAuthClient ¶
func NewAuthClient(baseURL *url.URL, token string) (*AuthClient, error)
NewAuthClient returns a new auth client.
func (*AuthClient) GetAccess ¶
func (c *AuthClient) GetAccess(ctx context.Context, accessKeyID string, clientIP string) (response *GetAccessResponse, err error)
GetAccess returns the auth service access data for the give access key ID. clientIP is the IP of the client that has originated the request and it's required to be sent to the Auth service.
func (*AuthClient) GetHealthLive ¶
func (c *AuthClient) GetHealthLive(ctx context.Context) (bool, error)
GetHealthLive returns the auth service health live status.
type Config ¶ added in v1.8.0
type Config struct {
Address string `help:"Address to serve gateway on" default:"127.0.0.1:7777"`
Dir string `help:"Minio generic server config path" default:"$CONFDIR/minio"`
}
Config determines how server listens for requests.
type GetAccessResponse ¶
type GetAccessResponse struct {
AccessGrant string `json:"access_grant"`
SecretKey string `json:"secret_key"`
IsPublic bool `json:"public"`
}
GetAccessResponse contains Access information from the Auth Service.
type MinioSystemLogTarget ¶ added in v1.7.0
type MinioSystemLogTarget struct {
// contains filtered or unexported fields
}
MinioSystemLogTarget is used for receiving system error messages from minio.
func NewMinioSystemLogTarget ¶ added in v1.7.0
func NewMinioSystemLogTarget(log *zap.Logger) *MinioSystemLogTarget
NewMinioSystemLogTarget returns a new MinioSystemLogTarget.
func (*MinioSystemLogTarget) Endpoint ¶ added in v1.7.0
func (lt *MinioSystemLogTarget) Endpoint() string
Endpoint is used by minio logger.Target but unused for our purposes.
func (*MinioSystemLogTarget) Send ¶ added in v1.7.0
func (lt *MinioSystemLogTarget) Send(e interface{}, errKind string) error
Send is called by minio whenever it logs an unexpected error, such as an internal server error that isn't mapped to a minio response. A system error in minio is defined as not having request information, as it occurs early in the request. An example of a system error is the IAM store in minio failing to retrieve a user, so in our case not being able to contact the auth service. We deliberately don't use this facility to log request scoped logs, like for specific handler (e.g. ListBuckets) errors, as those are handled separately in LogResponsesNoPaths().
func (*MinioSystemLogTarget) String ¶ added in v1.7.0
func (lt *MinioSystemLogTarget) String() string
String is used by minio logger.Target but unused for our purposes.
func (*MinioSystemLogTarget) Validate ¶ added in v1.7.0
func (lt *MinioSystemLogTarget) Validate() error
Validate is used by minio logger.Target but unused for our purposes.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an S3 compatible http server.
func New ¶
func New(listener net.Listener, log *zap.Logger, tlsConfig *tls.Config, useSetInMemoryMiddleware bool, trustedIPs trustedip.List, insecureLogAll bool, corsAllowedOrigins []string) *Server
New returns new instance of an S3 compatible http server.
TODO: at the time of wiring the new Signature middleware we'll start to use/ pass around the trustedIPs parameter.