api

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChorusHandlers added in v0.7.0

func ChorusHandlers(
	credsSvc objstore.CredsService,
	proxyClient rpc.Proxy,
	appInfo *dom.AppInfo,
) pb.ChorusServer

func DiffHandlers added in v0.7.0

func DiffHandlers(
	credsSvc objstore.CredsService,
	queueSvc tasks.QueueService,
	checkSvc *handler.ConsistencyCheckSvc,
) pb.DiffServer

func ErrorInterceptor

func ErrorInterceptor() grpc.UnaryServerInterceptor

func ErrorStreamInterceptor

func ErrorStreamInterceptor() grpc.StreamServerInterceptor

func GRPCGateway

func GRPCGateway(ctx context.Context, conf *Config, register RegisterHandlersFunc) (start func(context.Context) error, stop func(context.Context) error, err error)

func NewGrpcServer

func NewGrpcServer(port int, register RegisterServicesFunc, tracer otel_trace.TracerProvider, logConf *log.Config, version dom.AppInfo) (start func(context.Context) error, stop func(context.Context) error, err error)

func PolicyHandlers added in v0.7.0

func PolicyHandlers(
	credsSvc objstore.CredsService,
	clients objstore.Clients,
	queueSvc tasks.QueueService,
	policySvc policy.Service,
	versionSvc meta.VersionService,
	objectListStateStore *store.MigrationObjectListStateStore,
	bucketListStateStore *store.MigrationBucketListStateStore,
	notificationSvc *notifications.Service,
	replicationStatusLocker *store.ReplicationStatusLocker,
	userLocker *store.UserLocker,
	webhookConf *WebhookConfig,
) pb.PolicyServer

func WebhookHandlers added in v0.7.2

func WebhookHandlers(
	credsSvc objstore.CredsService,
	policySvc policy.Service,
	swiftReplSvc replication.Service,
	s3ReplSvc replication.Service,
) pb.WebhookServer

Types

type Config

type Config struct {
	Webhook  WebhookConfig `yaml:"webhook"`
	GrpcPort int           `yaml:"grpcPort"`
	HttpPort int           `yaml:"httpPort"`
	Enabled  bool          `yaml:"enabled"`
	Secure   bool          `yaml:"secure"`
}

type RegisterHandlersFunc

type RegisterHandlersFunc func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

type RegisterServicesFunc added in v0.7.0

type RegisterServicesFunc func(srv *grpc.Server)

type WebhookConfig added in v0.7.2

type WebhookConfig struct {
	BaseURL  string `yaml:"baseUrl"`
	GrpcPort int    `yaml:"grpcPort"`
	HttpPort int    `yaml:"httpPort"`
	Enabled  bool   `yaml:"enabled"`
}

func (*WebhookConfig) S3NotificationURL added in v0.7.2

func (c *WebhookConfig) S3NotificationURL(storage string) (string, error)

func (*WebhookConfig) SwiftWebhookURL added in v0.7.2

func (c *WebhookConfig) SwiftWebhookURL(storage string) (string, error)

func (*WebhookConfig) Validate added in v0.7.2

func (c *WebhookConfig) Validate() error

Jump to

Keyboard shortcuts

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