Documentation ¶
Index ¶
- Constants
- func ActivityToContext(ctx context.Context, a *Activity) context.Context
- func ActivityToProto(a *Activity) *diveContracts.Activity
- func EventToProto(e Event) *diveContracts.Activity_Event
- func StreamServerInterceptor(master *Master) grpc.StreamServerInterceptor
- func UnaryServerInterceptor(master *Master) grpc.UnaryServerInterceptor
- type Activity
- func ActivityFromContext(ctx context.Context) *Activity
- func ActivityFromProto(a *diveContracts.Activity) *Activity
- func NewBackgroundActivity(req any, jobID string) *Activity
- func NewStreamGrpcActivity(service string, method string, req any) *Activity
- func NewUnaryGrpcActivity(service string, method string, req any) *Activity
- func (a *Activity) AddEvent(name string, ts time.Time, payload map[string]string)
- func (a *Activity) AddEventNow(name string, payload map[string]string)
- func (a *Activity) Duration() time.Duration
- func (a *Activity) Events() []Event
- func (a *Activity) ID() string
- func (a *Activity) Props() map[string]string
- func (a *Activity) Request() any
- func (a *Activity) SetProp(key string, value string)
- func (a *Activity) SetProps(props map[string]string)
- func (a *Activity) SetRequest(req any)
- func (a *Activity) StartedAt() time.Time
- type Event
- type Events
- type GrpcServer
- type Master
Constants ¶
View Source
const ( PropBackgroundJobID = "bg_job_id" PropGrpcType = "grpc_type" PropGrpcTypeUnary = "unary" PropGrpcTypeStream = "stream" PropGrpcService = "grpc_service" PropGrpcMethod = "grpc_method" )
Variables ¶
This section is empty.
Functions ¶
func ActivityToProto ¶ added in v0.1.3
func ActivityToProto(a *Activity) *diveContracts.Activity
func EventToProto ¶ added in v0.1.3
func EventToProto(e Event) *diveContracts.Activity_Event
func StreamServerInterceptor ¶
func StreamServerInterceptor(master *Master) grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(master *Master) grpc.UnaryServerInterceptor
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
func ActivityFromContext ¶
func ActivityFromProto ¶ added in v0.1.3
func ActivityFromProto(a *diveContracts.Activity) *Activity
func NewBackgroundActivity ¶
func NewStreamGrpcActivity ¶
func NewUnaryGrpcActivity ¶
func (*Activity) AddEventNow ¶ added in v0.1.3
func (*Activity) SetRequest ¶ added in v0.1.3
type Event ¶ added in v0.1.3
type Event struct {
// contains filtered or unexported fields
}
func EventFromProto ¶ added in v0.1.3
func EventFromProto(e *diveContracts.Activity_Event) Event
type GrpcServer ¶
type GrpcServer struct { diveContracts.UnimplementedDiveServiceServer // contains filtered or unexported fields }
func NewGrpcServer ¶
func NewGrpcServer(master *Master) *GrpcServer
func (*GrpcServer) Dive ¶
func (s *GrpcServer) Dive(ctx context.Context, req *diveContracts.DiveRequest) (*diveContracts.DiveResponse, error)
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
func (*Master) AddActivity ¶
func (*Master) GetActivity ¶
func (*Master) RemoveActivity ¶
func (*Master) WalkActivities ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.