Documentation ¶
Index ¶
- Constants
- func CreateLocalChannel(config ChannelConfiguration) (channel.AppChannel, error)
- type Channel
- func (h *Channel) GetAppConfig() (*config.ApplicationConfig, error)
- func (h *Channel) HealthProbe(ctx context.Context) (bool, error)
- func (h *Channel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest) (rsp *invokev1.InvokeMethodResponse, err error)
- func (h *Channel) SetAppHealth(ah *apphealth.AppHealth)
- func (h *Channel) SetAppHealthCheckPath(path string)
- type ChannelConfiguration
- type RWRecorder
Constants ¶
View Source
const (
// HTTPStatusCode is an dapr http channel status code.
HTTPStatusCode = "http.status_code"
)
Variables ¶
This section is empty.
Functions ¶
func CreateLocalChannel ¶
func CreateLocalChannel(config ChannelConfiguration) (channel.AppChannel, error)
CreateLocalChannel creates an HTTP AppChannel.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is an HTTP implementation of an AppChannel.
func (*Channel) GetAppConfig ¶ added in v1.2.0
func (h *Channel) GetAppConfig() (*config.ApplicationConfig, error)
GetAppConfig gets application config from user application GET http://localhost:<app_port>/dapr/config
func (*Channel) HealthProbe ¶ added in v1.9.0
HealthProbe performs a health probe.
func (*Channel) InvokeMethod ¶
func (h *Channel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest) (rsp *invokev1.InvokeMethodResponse, err error)
InvokeMethod invokes user code via HTTP.
func (*Channel) SetAppHealth ¶ added in v1.9.0
SetAppHealth sets the apphealth.AppHealth object.
func (*Channel) SetAppHealthCheckPath ¶ added in v1.9.0
SetAppHealthCheckPath sets the path where to send requests for health probes.
type ChannelConfiguration ¶ added in v1.10.5
type ChannelConfiguration struct { Client *http.Client Endpoint string MaxConcurrency int Pipeline httpMiddleware.Pipeline TracingSpec config.TracingSpec MaxRequestBodySizeMB int }
ChannelConfiguration is the configuration used to create an HTTP AppChannel.
type RWRecorder ¶ added in v1.11.0
type RWRecorder struct { W io.ReadWriter // contains filtered or unexported fields }
func (*RWRecorder) Header ¶ added in v1.11.0
func (w *RWRecorder) Header() http.Header
func (*RWRecorder) Result ¶ added in v1.11.0
func (w *RWRecorder) Result() *http.Response
func (*RWRecorder) StatusCode ¶ added in v1.11.0
func (w *RWRecorder) StatusCode() int
func (*RWRecorder) WriteHeader ¶ added in v1.11.0
func (w *RWRecorder) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.