Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for Writer (0.18 sec)

  1. internal/ioutil/ioutil.go

    // executes at least one write operation if it is closed.
    //
    // This can be useful within the context of HTTP. At least
    // one write operation must happen to send the HTTP headers
    // to the peer.
    type WriteOnCloser struct {
    	io.Writer
    	hasWritten bool
    }
    
    func (w *WriteOnCloser) Write(p []byte) (int, error) {
    	w.hasWritten = true
    	return w.Writer.Write(p)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  2. cmd/post-policy_test.go

    	if !corruptedMultipart {
    		var writer io.Writer
    		var err error
    		if noFilename {
    			writer, err = w.CreateFormField("file")
    		} else {
    			writer, err = w.CreateFormFile("file", "upload.txt")
    		}
    		if err != nil {
    			// return nil, err
    			return nil, err
    		}
    		writer.Write(objData)
    		// Close before creating the new request.
    		w.Close()
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/ztunnel/configdump/configdump.go

    	"encoding/json"
    	"fmt"
    	"io"
    	"text/tabwriter"
    
    	"sigs.k8s.io/yaml"
    )
    
    // ConfigWriter is a writer for processing responses from the Ztunnel Admin config_dump endpoint
    type ConfigWriter struct {
    	Stdout      io.Writer
    	ztunnelDump *ZtunnelDump
    	FullDump    []byte
    }
    
    // Prime loads the config dump into the writer ready for printing
    func (c *ConfigWriter) Prime(b []byte) error {
    	cd := ZtunnelDump{}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/compare/comparator.go

    )
    
    // Comparator diffs between a config dump from Istiod and one from Envoy
    type Comparator struct {
    	envoy, istiod *configdump.Wrapper
    	w             io.Writer
    	context       int
    	location      string
    }
    
    // NewComparator is a comparator constructor
    func NewComparator(w io.Writer, istiodResponses map[string][]byte, envoyResponse []byte) (*Comparator, error) {
    	c := &Comparator{}
    	for _, resp := range istiodResponses {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 3.7K bytes
    - Viewed (1)
  5. istioctl/pkg/writer/ztunnel/configdump/certificates.go

    func (c *ConfigWriter) PrintSecretSummary() error {
    	if c.ztunnelDump == nil {
    		return fmt.Errorf("config writer has not been primed")
    	}
    	secretDump := c.ztunnelDump.Certificates
    	w := new(tabwriter.Writer).Init(c.Stdout, 0, 8, 5, ' ', 0)
    	fmt.Fprintln(w, "CERTIFICATE NAME\tTYPE\tSTATUS\tVALID CERT\tSERIAL NUMBER\tNOT AFTER\tNOT BEFORE")
    
    	for _, secret := range secretDump {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. cmd/erasure-decode.go

    }
    
    // Decode reads from readers, reconstructs data if needed and writes the data to the writer.
    // A set of preferred drives can be supplied. In that case they will be used and the data reconstructed.
    func (e Erasure) Decode(ctx context.Context, writer io.Writer, readers []io.ReaderAt, offset, length, totalLength int64, prefer []bool) (written int64, derr error) {
    	if offset < 0 || length < 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/endpoint.go

    		}
    	}
    	return "unknown"
    }
    
    func (c *ConfigWriter) PrintEndpoints(filter EndpointFilter, outputFormat string) error {
    	if c.configDump == nil {
    		return fmt.Errorf("config writer has not been primed")
    	}
    	dump, err := c.retrieveSortedEndpointsSlice(filter)
    	if err != nil {
    		return err
    	}
    	marshaller := make(proto.MessageSlice, 0, len(dump))
    	for _, eds := range dump {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. istioctl/pkg/waypoint/waypoint.go

    				List(context.Background(), metav1.ListOptions{})
    			if err != nil {
    				return err
    			}
    			if len(gws.Items) == 0 {
    				fmt.Fprintln(writer, "No waypoints found.")
    				return nil
    			}
    			w := new(tabwriter.Writer).Init(writer, 0, 8, 5, ' ', 0)
    			slices.SortFunc(gws.Items, func(i, j gateway.Gateway) int {
    				if r := cmp.Compare(i.Namespace, j.Namespace); r != 0 {
    					return r
    				}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Apr 22 20:20:40 GMT 2024
    - 15K bytes
    - Viewed (0)
  9. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/AbstractGradleViolationRule.groovy

        private static String prettyPrintJson(def acceptanceJson) {
            def stringWriter = new StringWriter()
            new JsonWriter(stringWriter).withCloseable { writer ->
                writer.setIndent("    ")
                new Gson().toJson(acceptanceJson, AcceptedApiChange, writer)
            }
            return stringWriter.toString()
        }
    
        String getCurrentVersion() {
            return context.getUserData().get("currentVersion")
    Groovy
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Tue Apr 23 08:40:36 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/policies.go

    	"cmp"
    	"encoding/json"
    	"fmt"
    	"strings"
    
    	"sigs.k8s.io/yaml"
    
    	"istio.io/istio/pkg/maps"
    	"istio.io/istio/pkg/slices"
    )
    
    // PolicyFilter is used to pass filter information into service based config writer print functions
    type PolicyFilter struct {
    	Namespace string
    }
    
    // Verify returns true if the passed workload matches the filter fields
    func (wf *PolicyFilter) Verify(pol *ZtunnelPolicy) bool {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top