Documentation ¶
Index ¶
- Constants
- func ToProto(e *v2.Event) (*cloudevents.CloudEvent, error)
- type Config
- type ControllerProxy
- func (cp *ControllerProxy) Ack(stream proxypb.StoreProxy_AckServer) error
- func (cp *ControllerProxy) ClusterInfo(_ context.Context, _ *emptypb.Empty) (*proxypb.ClusterInfoResponse, error)
- func (cp *ControllerProxy) CreateEventbus(ctx context.Context, req *ctrlpb.CreateEventbusRequest) (*metapb.Eventbus, error)
- func (cp *ControllerProxy) CreateNamespace(ctx context.Context, request *ctrlpb.CreateNamespaceRequest) (*metapb.Namespace, error)
- func (cp *ControllerProxy) CreateSubscription(ctx context.Context, req *ctrlpb.CreateSubscriptionRequest) (*metapb.Subscription, error)
- func (cp *ControllerProxy) CreateToken(ctx context.Context, request *ctrlpb.CreateTokenRequest) (*metapb.Token, error)
- func (cp *ControllerProxy) CreateUser(ctx context.Context, request *ctrlpb.CreateUserRequest) (*metapb.User, error)
- func (cp *ControllerProxy) DeleteEventbus(ctx context.Context, id *wrapperspb.UInt64Value) (*emptypb.Empty, error)
- func (cp *ControllerProxy) DeleteNamespace(ctx context.Context, request *ctrlpb.DeleteNamespaceRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) DeleteSubscription(ctx context.Context, req *ctrlpb.DeleteSubscriptionRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) DeleteToken(ctx context.Context, request *ctrlpb.DeleteTokenRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) DeleteUser(ctx context.Context, value *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (cp *ControllerProxy) DisableSubscription(ctx context.Context, req *ctrlpb.DisableSubscriptionRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) GetDeadLetterEvent(ctx context.Context, req *proxypb.GetDeadLetterEventRequest) (*proxypb.GetDeadLetterEventResponse, error)
- func (cp *ControllerProxy) GetEvent(ctx context.Context, req *proxypb.GetEventRequest) (*proxypb.GetEventResponse, error)
- func (cp *ControllerProxy) GetEventbus(ctx context.Context, id *wrapperspb.UInt64Value) (*metapb.Eventbus, error)
- func (cp *ControllerProxy) GetEventbusWithHumanFriendly(ctx context.Context, request *ctrlpb.GetEventbusWithHumanFriendlyRequest) (*metapb.Eventbus, error)
- func (cp *ControllerProxy) GetNamespace(ctx context.Context, request *ctrlpb.GetNamespaceRequest) (*metapb.Namespace, error)
- func (cp *ControllerProxy) GetNamespaceWithHumanFriendly(ctx context.Context, value *wrapperspb.StringValue) (*metapb.Namespace, error)
- func (cp *ControllerProxy) GetResourceRole(ctx context.Context, request *ctrlpb.GetResourceRoleRequest) (*ctrlpb.GetResourceRoleResponse, error)
- func (cp *ControllerProxy) GetSubscription(ctx context.Context, req *ctrlpb.GetSubscriptionRequest) (*metapb.Subscription, error)
- func (cp *ControllerProxy) GetUser(ctx context.Context, value *wrapperspb.StringValue) (*metapb.User, error)
- func (cp *ControllerProxy) GetUserRole(ctx context.Context, request *ctrlpb.GetUserRoleRequest) (*ctrlpb.GetUserRoleResponse, error)
- func (cp *ControllerProxy) GetUserToken(ctx context.Context, request *wrapperspb.StringValue) (*ctrlpb.GetTokenResponse, error)
- func (cp *ControllerProxy) GrantRole(ctx context.Context, request *ctrlpb.RoleRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) ListEventbus(ctx context.Context, req *ctrlpb.ListEventbusRequest) (*ctrlpb.ListEventbusResponse, error)
- func (cp *ControllerProxy) ListNamespace(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListNamespaceResponse, error)
- func (cp *ControllerProxy) ListSegment(ctx context.Context, req *ctrlpb.ListSegmentRequest) (*ctrlpb.ListSegmentResponse, error)
- func (cp *ControllerProxy) ListSubscription(ctx context.Context, req *ctrlpb.ListSubscriptionRequest) (*ctrlpb.ListSubscriptionResponse, error)
- func (cp *ControllerProxy) ListToken(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListTokenResponse, error)
- func (cp *ControllerProxy) ListUser(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListUserResponse, error)
- func (cp *ControllerProxy) LookupOffset(ctx context.Context, req *proxypb.LookupOffsetRequest) (*proxypb.LookupOffsetResponse, error)
- func (cp *ControllerProxy) Publish(ctx context.Context, req *proxypb.PublishRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) ResendDeadLetterEvent(ctx context.Context, req *proxypb.ResendDeadLetterEventRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) ResetOffsetToTimestamp(ctx context.Context, req *ctrlpb.ResetOffsetToTimestampRequest) (*ctrlpb.ResetOffsetToTimestampResponse, error)
- func (cp *ControllerProxy) ResumeSubscription(ctx context.Context, req *ctrlpb.ResumeSubscriptionRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) RevokeRole(ctx context.Context, request *ctrlpb.RoleRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) SetClient(client eb.Client)
- func (cp *ControllerProxy) SetDeadLetterEventOffset(ctx context.Context, req *ctrlpb.SetDeadLetterEventOffsetRequest) (*emptypb.Empty, error)
- func (cp *ControllerProxy) Start() error
- func (cp *ControllerProxy) Stop()
- func (cp *ControllerProxy) Subscribe(req *proxypb.SubscribeRequest, stream proxypb.StoreProxy_SubscribeServer) error
- func (cp *ControllerProxy) UpdateEventbus(_ context.Context, _ *ctrlpb.UpdateEventbusRequest) (*metapb.Eventbus, error)
- func (cp *ControllerProxy) UpdateSubscription(ctx context.Context, req *ctrlpb.UpdateSubscriptionRequest) (*metapb.Subscription, error)
- func (cp *ControllerProxy) ValidateSubscription(ctx context.Context, req *proxypb.ValidateSubscriptionRequest) (*proxypb.ValidateSubscriptionResponse, error)
Constants ¶
View Source
const (
ContentTypeProtobuf = "application/protobuf"
)
Variables ¶
This section is empty.
Functions ¶
func ToProto ¶
func ToProto(e *v2.Event) (*cloudevents.CloudEvent, error)
Types ¶
type Config ¶
type Config struct { Endpoints []string SinkPort int ProxyPort int CloudEventReceiverPort int Credentials credentials.TransportCredentials GRPCReflectionEnable bool AuthCfg auth.Config }
type ControllerProxy ¶
type ControllerProxy struct {
// contains filtered or unexported fields
}
func NewControllerProxy ¶
func NewControllerProxy(cfg Config) *ControllerProxy
func (*ControllerProxy) Ack ¶
func (cp *ControllerProxy) Ack(stream proxypb.StoreProxy_AckServer) error
func (*ControllerProxy) ClusterInfo ¶
func (cp *ControllerProxy) ClusterInfo(_ context.Context, _ *emptypb.Empty) (*proxypb.ClusterInfoResponse, error)
func (*ControllerProxy) CreateEventbus ¶
func (cp *ControllerProxy) CreateEventbus( ctx context.Context, req *ctrlpb.CreateEventbusRequest, ) (*metapb.Eventbus, error)
func (*ControllerProxy) CreateNamespace ¶
func (cp *ControllerProxy) CreateNamespace(ctx context.Context, request *ctrlpb.CreateNamespaceRequest) (*metapb.Namespace, error)
func (*ControllerProxy) CreateSubscription ¶
func (cp *ControllerProxy) CreateSubscription( ctx context.Context, req *ctrlpb.CreateSubscriptionRequest, ) (*metapb.Subscription, error)
func (*ControllerProxy) CreateToken ¶
func (cp *ControllerProxy) CreateToken(ctx context.Context, request *ctrlpb.CreateTokenRequest, ) (*metapb.Token, error)
func (*ControllerProxy) CreateUser ¶
func (cp *ControllerProxy) CreateUser(ctx context.Context, request *ctrlpb.CreateUserRequest) (*metapb.User, error)
func (*ControllerProxy) DeleteEventbus ¶
func (cp *ControllerProxy) DeleteEventbus( ctx context.Context, id *wrapperspb.UInt64Value, ) (*emptypb.Empty, error)
func (*ControllerProxy) DeleteNamespace ¶
func (cp *ControllerProxy) DeleteNamespace(ctx context.Context, request *ctrlpb.DeleteNamespaceRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) DeleteSubscription ¶
func (cp *ControllerProxy) DeleteSubscription( ctx context.Context, req *ctrlpb.DeleteSubscriptionRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) DeleteToken ¶
func (cp *ControllerProxy) DeleteToken(ctx context.Context, request *ctrlpb.DeleteTokenRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) DeleteUser ¶
func (cp *ControllerProxy) DeleteUser(ctx context.Context, value *wrapperspb.StringValue) (*emptypb.Empty, error)
func (*ControllerProxy) DisableSubscription ¶
func (cp *ControllerProxy) DisableSubscription( ctx context.Context, req *ctrlpb.DisableSubscriptionRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) GetDeadLetterEvent ¶
func (cp *ControllerProxy) GetDeadLetterEvent( ctx context.Context, req *proxypb.GetDeadLetterEventRequest, ) (*proxypb.GetDeadLetterEventResponse, error)
func (*ControllerProxy) GetEvent ¶
func (cp *ControllerProxy) GetEvent( ctx context.Context, req *proxypb.GetEventRequest, ) (*proxypb.GetEventResponse, error)
func (*ControllerProxy) GetEventbus ¶
func (cp *ControllerProxy) GetEventbus( ctx context.Context, id *wrapperspb.UInt64Value, ) (*metapb.Eventbus, error)
func (*ControllerProxy) GetEventbusWithHumanFriendly ¶
func (cp *ControllerProxy) GetEventbusWithHumanFriendly(ctx context.Context, request *ctrlpb.GetEventbusWithHumanFriendlyRequest) (*metapb.Eventbus, error)
func (*ControllerProxy) GetNamespace ¶
func (cp *ControllerProxy) GetNamespace(ctx context.Context, request *ctrlpb.GetNamespaceRequest, ) (*metapb.Namespace, error)
func (*ControllerProxy) GetNamespaceWithHumanFriendly ¶
func (cp *ControllerProxy) GetNamespaceWithHumanFriendly(ctx context.Context, value *wrapperspb.StringValue) (*metapb.Namespace, error)
func (*ControllerProxy) GetResourceRole ¶
func (cp *ControllerProxy) GetResourceRole(ctx context.Context, request *ctrlpb.GetResourceRoleRequest, ) (*ctrlpb.GetResourceRoleResponse, error)
func (*ControllerProxy) GetSubscription ¶
func (cp *ControllerProxy) GetSubscription( ctx context.Context, req *ctrlpb.GetSubscriptionRequest, ) (*metapb.Subscription, error)
func (*ControllerProxy) GetUser ¶
func (cp *ControllerProxy) GetUser(ctx context.Context, value *wrapperspb.StringValue) (*metapb.User, error)
func (*ControllerProxy) GetUserRole ¶
func (cp *ControllerProxy) GetUserRole(ctx context.Context, request *ctrlpb.GetUserRoleRequest, ) (*ctrlpb.GetUserRoleResponse, error)
func (*ControllerProxy) GetUserToken ¶
func (cp *ControllerProxy) GetUserToken(ctx context.Context, request *wrapperspb.StringValue, ) (*ctrlpb.GetTokenResponse, error)
func (*ControllerProxy) GrantRole ¶
func (cp *ControllerProxy) GrantRole(ctx context.Context, request *ctrlpb.RoleRequest) (*emptypb.Empty, error)
func (*ControllerProxy) ListEventbus ¶
func (cp *ControllerProxy) ListEventbus( ctx context.Context, req *ctrlpb.ListEventbusRequest, ) (*ctrlpb.ListEventbusResponse, error)
func (*ControllerProxy) ListNamespace ¶
func (cp *ControllerProxy) ListNamespace(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListNamespaceResponse, error)
func (*ControllerProxy) ListSegment ¶
func (cp *ControllerProxy) ListSegment( ctx context.Context, req *ctrlpb.ListSegmentRequest, ) (*ctrlpb.ListSegmentResponse, error)
func (*ControllerProxy) ListSubscription ¶
func (cp *ControllerProxy) ListSubscription( ctx context.Context, req *ctrlpb.ListSubscriptionRequest, ) (*ctrlpb.ListSubscriptionResponse, error)
func (*ControllerProxy) ListToken ¶
func (cp *ControllerProxy) ListToken(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListTokenResponse, error)
func (*ControllerProxy) ListUser ¶
func (cp *ControllerProxy) ListUser(ctx context.Context, empty *emptypb.Empty) (*ctrlpb.ListUserResponse, error)
func (*ControllerProxy) LookupOffset ¶
func (cp *ControllerProxy) LookupOffset( ctx context.Context, req *proxypb.LookupOffsetRequest, ) (*proxypb.LookupOffsetResponse, error)
func (*ControllerProxy) Publish ¶
func (cp *ControllerProxy) Publish(ctx context.Context, req *proxypb.PublishRequest) (*emptypb.Empty, error)
func (*ControllerProxy) ResendDeadLetterEvent ¶
func (cp *ControllerProxy) ResendDeadLetterEvent( ctx context.Context, req *proxypb.ResendDeadLetterEventRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) ResetOffsetToTimestamp ¶
func (cp *ControllerProxy) ResetOffsetToTimestamp( ctx context.Context, req *ctrlpb.ResetOffsetToTimestampRequest, ) (*ctrlpb.ResetOffsetToTimestampResponse, error)
func (*ControllerProxy) ResumeSubscription ¶
func (cp *ControllerProxy) ResumeSubscription( ctx context.Context, req *ctrlpb.ResumeSubscriptionRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) RevokeRole ¶
func (cp *ControllerProxy) RevokeRole(ctx context.Context, request *ctrlpb.RoleRequest) (*emptypb.Empty, error)
func (*ControllerProxy) SetClient ¶
func (cp *ControllerProxy) SetClient(client eb.Client)
SetClient just for test.
func (*ControllerProxy) SetDeadLetterEventOffset ¶
func (cp *ControllerProxy) SetDeadLetterEventOffset( ctx context.Context, req *ctrlpb.SetDeadLetterEventOffsetRequest, ) (*emptypb.Empty, error)
func (*ControllerProxy) Start ¶
func (cp *ControllerProxy) Start() error
func (*ControllerProxy) Stop ¶
func (cp *ControllerProxy) Stop()
func (*ControllerProxy) Subscribe ¶
func (cp *ControllerProxy) Subscribe(req *proxypb.SubscribeRequest, stream proxypb.StoreProxy_SubscribeServer) error
Subscribe todo authentication
func (*ControllerProxy) UpdateEventbus ¶
func (cp *ControllerProxy) UpdateEventbus( _ context.Context, _ *ctrlpb.UpdateEventbusRequest, ) (*metapb.Eventbus, error)
func (*ControllerProxy) UpdateSubscription ¶
func (cp *ControllerProxy) UpdateSubscription( ctx context.Context, req *ctrlpb.UpdateSubscriptionRequest, ) (*metapb.Subscription, error)
func (*ControllerProxy) ValidateSubscription ¶
func (cp *ControllerProxy) ValidateSubscription( ctx context.Context, req *proxypb.ValidateSubscriptionRequest, ) (*proxypb.ValidateSubscriptionResponse, error)
Click to show internal directories.
Click to hide internal directories.