gitlab.com/ignitionrobotics/web/ign-go@v1.0.0-rc4/net/caller.go (about)

     1  package net
     2  
     3  import (
     4  	"context"
     5  )
     6  
     7  // Caller calls external service endpoints.
     8  type Caller interface {
     9  	// Call establishes a communication with the given endpoint, sending the input bytes as payload.
    10  	// If there is any response, it will be returned as a slice of bytes.
    11  	// Implementations should expect to receive the target service endpoint name through the `endpoint` parameter.
    12  	Call(ctx context.Context, endpoint string, in []byte) ([]byte, error)
    13  }