Documentation
¶
Overview ¶
Package migration is a generated protocol buffer package.
It is generated from these files:
migration.proto
It has these top-level messages:
Empty HealthCheckResponse PauseRequest PauseResponse ResumeResponse MigrateResponse UnmigrateResponse
Index ¶
- Variables
- func NewMigration(cfg MigrationConfig) *migration
- func NewServer(options ...func(*migrationServer)) *migrationServer
- func RegisterMigrationServer(s *grpc.Server, srv MigrationServer)
- func WithClock(c clock) func(*migrationServer)
- func WithPGBouncer(bouncer pgBouncerPauser) func(*migrationServer)
- func WithPacemaker(c crm) func(*migrationServer)
- func WithServerLogger(logger *logrus.Logger) func(*migrationServer)
- type Empty
- type HealthCheckResponse
- type HealthCheckResponse_Status
- type MigrateResponse
- func (*MigrateResponse) Descriptor() ([]byte, []int)
- func (m *MigrateResponse) GetAddress() string
- func (m *MigrateResponse) GetCreatedAt() *google_protobuf.Timestamp
- func (m *MigrateResponse) GetMigratingTo() string
- func (*MigrateResponse) ProtoMessage()
- func (m *MigrateResponse) Reset()
- func (m *MigrateResponse) String() string
- type MigrationClient
- type MigrationConfig
- type MigrationServer
- type PauseRequest
- type PauseResponse
- type ResumeResponse
- type UnmigrateResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var HealthCheckResponse_Status_name = map[int32]string{
0: "UNKNOWN",
1: "HEALTHY",
2: "UNHEALTHY",
}
View Source
var HealthCheckResponse_Status_value = map[string]int32{
"UNKNOWN": 0,
"HEALTHY": 1,
"UNHEALTHY": 2,
}
Functions ¶
func NewMigration ¶
func NewMigration(cfg MigrationConfig) *migration
func RegisterMigrationServer ¶
func RegisterMigrationServer(s *grpc.Server, srv MigrationServer)
func WithPGBouncer ¶
func WithPGBouncer(bouncer pgBouncerPauser) func(*migrationServer)
func WithPacemaker ¶
func WithPacemaker(c crm) func(*migrationServer)
func WithServerLogger ¶
Types ¶
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status HealthCheckResponse_Status `protobuf:"varint,1,opt,name=status,enum=migration.HealthCheckResponse_Status" json:"status,omitempty"`
}
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_Status
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (m *HealthCheckResponse) String() string
type HealthCheckResponse_Status ¶
type HealthCheckResponse_Status int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_Status = 0 HealthCheckResponse_HEALTHY HealthCheckResponse_Status = 1 HealthCheckResponse_UNHEALTHY HealthCheckResponse_Status = 2 )
func (HealthCheckResponse_Status) EnumDescriptor ¶
func (HealthCheckResponse_Status) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_Status) String ¶
func (x HealthCheckResponse_Status) String() string
type MigrateResponse ¶
type MigrateResponse struct { MigratingTo string `protobuf:"bytes,1,opt,name=migrating_to,json=migratingTo" json:"migrating_to,omitempty"` Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` }
func (*MigrateResponse) Descriptor ¶
func (*MigrateResponse) Descriptor() ([]byte, []int)
func (*MigrateResponse) GetAddress ¶
func (m *MigrateResponse) GetAddress() string
func (*MigrateResponse) GetCreatedAt ¶
func (m *MigrateResponse) GetCreatedAt() *google_protobuf.Timestamp
func (*MigrateResponse) GetMigratingTo ¶
func (m *MigrateResponse) GetMigratingTo() string
func (*MigrateResponse) ProtoMessage ¶
func (*MigrateResponse) ProtoMessage()
func (*MigrateResponse) Reset ¶
func (m *MigrateResponse) Reset()
func (*MigrateResponse) String ¶
func (m *MigrateResponse) String() string
type MigrationClient ¶
type MigrationClient interface { HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*PauseResponse, error) Resume(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResumeResponse, error) Migrate(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MigrateResponse, error) Unmigrate(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UnmigrateResponse, error) }
func NewMigrationClient ¶
func NewMigrationClient(cc *grpc.ClientConn) MigrationClient
type MigrationConfig ¶
type MigrationServer ¶
type MigrationServer interface { HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error) Pause(context.Context, *PauseRequest) (*PauseResponse, error) Resume(context.Context, *Empty) (*ResumeResponse, error) Migrate(context.Context, *Empty) (*MigrateResponse, error) Unmigrate(context.Context, *Empty) (*UnmigrateResponse, error) }
type PauseRequest ¶
type PauseRequest struct { Timeout int32 `protobuf:"varint,1,opt,name=timeout" json:"timeout,omitempty"` Expiry int32 `protobuf:"varint,2,opt,name=expiry" json:"expiry,omitempty"` }
func (*PauseRequest) Descriptor ¶
func (*PauseRequest) Descriptor() ([]byte, []int)
func (*PauseRequest) GetExpiry ¶
func (m *PauseRequest) GetExpiry() int32
func (*PauseRequest) GetTimeout ¶
func (m *PauseRequest) GetTimeout() int32
func (*PauseRequest) ProtoMessage ¶
func (*PauseRequest) ProtoMessage()
func (*PauseRequest) Reset ¶
func (m *PauseRequest) Reset()
func (*PauseRequest) String ¶
func (m *PauseRequest) String() string
type PauseResponse ¶
type PauseResponse struct { CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` ExpiresAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt" json:"expires_at,omitempty"` }
func (*PauseResponse) Descriptor ¶
func (*PauseResponse) Descriptor() ([]byte, []int)
func (*PauseResponse) GetCreatedAt ¶
func (m *PauseResponse) GetCreatedAt() *google_protobuf.Timestamp
func (*PauseResponse) GetExpiresAt ¶
func (m *PauseResponse) GetExpiresAt() *google_protobuf.Timestamp
func (*PauseResponse) ProtoMessage ¶
func (*PauseResponse) ProtoMessage()
func (*PauseResponse) Reset ¶
func (m *PauseResponse) Reset()
func (*PauseResponse) String ¶
func (m *PauseResponse) String() string
type ResumeResponse ¶
type ResumeResponse struct {
CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
}
func (*ResumeResponse) Descriptor ¶
func (*ResumeResponse) Descriptor() ([]byte, []int)
func (*ResumeResponse) GetCreatedAt ¶
func (m *ResumeResponse) GetCreatedAt() *google_protobuf.Timestamp
func (*ResumeResponse) ProtoMessage ¶
func (*ResumeResponse) ProtoMessage()
func (*ResumeResponse) Reset ¶
func (m *ResumeResponse) Reset()
func (*ResumeResponse) String ¶
func (m *ResumeResponse) String() string
type UnmigrateResponse ¶
type UnmigrateResponse struct {
CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
}
func (*UnmigrateResponse) Descriptor ¶
func (*UnmigrateResponse) Descriptor() ([]byte, []int)
func (*UnmigrateResponse) GetCreatedAt ¶
func (m *UnmigrateResponse) GetCreatedAt() *google_protobuf.Timestamp
func (*UnmigrateResponse) ProtoMessage ¶
func (*UnmigrateResponse) ProtoMessage()
func (*UnmigrateResponse) Reset ¶
func (m *UnmigrateResponse) Reset()
func (*UnmigrateResponse) String ¶
func (m *UnmigrateResponse) String() string
Click to show internal directories.
Click to hide internal directories.